开发者

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

开发者 https://www.devze.com 2023-02-12 15:02 出处:网络
开发者_StackOverflow社区Ive developed a winforms application on my local machine using .net 4.0 and it runs fine. I have all dotnet versions installed.
开发者_StackOverflow社区

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.


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).


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消