When I start debugging a project in Visual Studio 2010 (F5), the applications runs even if there are compiler's errors. Why is this so? How can I repair this?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Menu, Tools->Options
回答2:
You might have set it to run from the last known successful build.
Look here for more details : How to enable/disable compile errors warning in Visual Studio
回答3:
This behaviour is by-design when the project is a Website. Visual Studio will start the web development server even before it ends compilation of all webpages. This happens because a Website is supposed to compile on demand, that is when the specific pages are requested. Web applications on the other hand, are precompiled.
回答4:
If you have multiple projects in the same solution and the errors are occuring in a project that isn't required by the startup project, then I think the code will launch.