views:

158

answers:

2

I have a WinForm application written with VS2008 and .NET 3.5. This application runs well from Visual Studio 2008 and outside (when VS2008 is closed, simple double-click on the EXE boots the application).

I decided this morning to migrate everything to VS2010 and .NET 4 (updated the target framework). Everything compiles and the application runs from VS2010 (click on the play button - in debug as well as in release). However, when I try to launch the application from explorer.exe, I see "Blabla has stopped working... Windows is checking...".

How can I debug such issue? I cannot attach the debugger since the application is not even started.

Thanks!

A: 

Since it doesn't start, check that the needed libraries (.DLLs) are in directories in PATH. If you can't tell, open a cmd prompt, cd to the DLL directory, c:\fullpath\to\myprogram and see if it will start. If so, then it's just that the DLLs aren't being found.

wallyk
Everything needed appears to be in the path. :(
Martin
A: 

I would say this problem is due to some DLLs missing but those are in the path you might want to try doing follwing:

1) add UnhandledException hanlder if you don't have it yet

AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler);

more details here AppDomain UnhandledException Event

2) add logging and dump your application initialisation steps into the text file. This might give you an idea which one (if any) fails

serge_gubenko