Application closing immediately after pressing run
I have encountered a problem that When I run the application in Visual Studio 2005 by pressing the Run button then VS IDE closes automatically without giving any err开发者_JAVA技巧or message. But when I run without debugging with Ctrl+F5 then Application page runs sucessfully.
As a solution I have installed fresh copy of visual studio but the problem remains unchanged.
Console
close immediately after running in debug mode if there's nothing to keep them open.
Try adding a Console.ReadLine()
to the end of your program.
you can debug release build also, just set the project configuration to Release and press the Debug button. Also in the project options, you can play with the various optimizations in Release mode, and can specify whether the Release build contains debugging information. The options depends on the type of the project which you haven't specified.
Seek professional help.
Specifically, Microsoft's support offerings.
Start here: http://support.microsoft.com/oas
What operating system? Perhaps, you could check you debug settings and restore the defaults.
I have an application that crashes when pressing run, but only if I have unsaved changed. I just compile before pressing run and then it all works fine. This happens on windows 7 only and I haven't been able to pinpoint the problem, but the compile before run work-around works every time.
Search (ctrl+shift+f for entire solution) for '#if DEBUG'. You may just be missing executing code due to a mistake. I've seen it happen to a person or three.
Take a look at Event Viewer
for more information about the problem.
精彩评论