简体   繁体   中英

.net c# Winforms .exe wont start on any other machine

Ive developed a winforms application on my local machine using .net 4.0 and it runs fine. I have all dotnet versions installed.

When I copied the .exe and all of its references (the complete bin\\debug and bin\\release) to another machine it simply does not run. On one of my VMS it fires up visual studio express and asks if I want to connect a debgger. On other machines it just doesnt do anything.

But I can work out what on earth is going on.

I have referenced soem xceed dlls that are installed in GAC but not on the target machines GAC could this be the problem?

How do I tell what the hell is going on?

Pete

Yes, the xceed dlls (and every other referenced dlls) must exist on the target machine -- either included in the application directory or the GAC.

You may try specifying "Copy Local = true" to the suspect references, and rebuilding your project, so that these dlls are specifically included with the compiled assemblies.

Have you checked that the other machine has a version of the .Net Framework installed? Failing that try to publish the application using the ClickOnce tool.

ClickOnce will download and instal any missing dependencies for the .Net Framework if necessary.

if you deploy the pdb-files to the one VM with VS Express installed you should be able to connect the debugger and see the exception details. And yes, a missing assembly can (or better: will) cause that kind of behavior if the assembly is not only referenced but actually used in your application. I would generally recommend to implement some kind of error logging (either to the event logs or to a text file).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM