VS 2008 winforms does not simulate after build succeeded
I am trying to compile my Win Form project through VS 2008 pro edition. There does not seem to be any compiler error. Build is succeeded but it does not show the dialog box instead it resets and stays in the VS window. I cannot simulate my project. Any ideas how to rectify this problem?
Sam HobbsPosted Jun 24, 2011, 2:44 AM
Note that in my first reply I said:
Abhinav MehtaPosted Jun 23, 2011, 4:09 PM
I tried running the project without debugging and it is working. It is only when I compile by pressing "F5" or "Start with Debugging" that's when it does not simulate. Otherwise "Start without Debugging" shows the application I created.
Seems that there something wrong with the Debugger. I have uninstalled and re-installed fresh VS 2008 and also updated all the service packs. Still no luck.
Sam HobbsPosted Jun 23, 2011, 4:05 PM
One thing you can try is to re-install Visual Studio. That will take time of course but if it fixes the problem then that will be easier than trying to diagnose the problem.
Abhinav MehtaPosted Jun 23, 2011, 10:17 AM
There doesn't seem to be any problem in the code because it was compiling properly when my PC got infected with some spyware unfortunately. However it has been resolved but the visual studio does not seem to run the application. I created a test win form application by creating a new project and it showed the same symptoms. The visual studio starts debugging and it also displays that the build is succeeded but it does not execute the application. It also displays an error window saying "Cannot run the project". It basically points to MS Visual Studio error.
Sam HobbsPosted Jun 22, 2011, 5:58 PM
Do you know how to use the debugger? Do you know how to single-step using the debugger? You should try doing that.
The most likely cause is that there is an error in the program that is being ignored. Your program should do something to catch errors, such as using try/catch. It would be a good idea to add code such as that; even if it is not relevant to the current problem, it could help in the future.
Use of the debugger however can help you determine the specific error that is the current problem.