开发者

Project will not start in debug mode

I'm using VS2008, and I have a project that will not start when I press F5 or when I click the little green triangle in the toolbar. The screen flickers once, like the project is going to run, and then it doesn't. The build message claims the build was successful, but the project won't start.

In the Configuration Manager, my 'Active solution configuration:' is set to Debug, and in the 'Project contexts' list, the 'Configuration' column for my Project is set to Debug. I've even switched them back and forth between Debug and Release and then back to Debug, all with no effect. The project that I'm trying to run is set as the 'Startup Project' in my solution.

If I go to my \bin\Debug folder and double-click the .exe, (which shows the proper time-stamp on the file) my app runs just fine.

Any ideas why I can't get the silly thing to run in debug mode?

EDIT:

It's a winforms application.

My version of Visual Studio is 9.0.30729.1 SP

.NET Framework: Version 3.5 SP1

EDIT:

This may be related to TortoiseSVN. I keep my source code for this project in SVN. When I do a different/new checkout in TortoiseSVN, sometimes the new checkout will then allow the project to run. I don't understand the se开发者_StackOverflowemingly intermittent nature of this problem.

EDIT:

Not sure if this information is relevant to the problem, but when I do a new checkout and have a folder structure that is less deep (not as many nested folders) than the original checkout, I seem to have a better chance of the project running without problems.

EDIT: The problem had nothing to do with TortoiseSVN, see my answer below.


IT ran some type of Windows update on my machine and that has apparently fixed the issue. It had something to do with a System.Runtime.InteropServices.COMException and an error in a 'Hosting' .dll. I'm not sure why a corrupt Hosting dll had an impact on a winforms application, but it has fixed the issue.


I had a similar issue in the past. The project would not run in debug mode.

It was also caused by a corrupted dll, but not the 'Hosting' one. It's been a long time, so I don't recall the exact dll, but it had something to do with Messaging.


Gotta start with the basics... Have you eliminated the possibility of a run-time crash before the main form is shown?


There are actually some questions that are similar to yours. The most common workaround is to uncheck the "Enable the Visual Studio hosting process" in project properties.

I sometime has to switch between debugging under x64 bit to Any CPU; re-loading the project, and delete any *.suo files in the project folder.


Don't have a precise answer, but do have a solution that worked for me.

Close the project / solution all down. Via Explorer, go to the bin\debug directory. Rename each of the files present within the directory. In my case i simply prefixed each entry with an "xxx". I did this so that I could backtrack once again, if required, as I didn't have the confidence simply to delete the entries. By re-opening the project/solution, and attempting to debug again, seems to force the regeneration of those files once again. For me the program resumed re-working. I have no idea what the specific cause of the problem is, but the complete rebuild of the files, does appear to work, rather than just a "Build" which must partially retain what was there before.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜