21

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?

Peter17
  • 3,052
  • 9
  • 47
  • 77

4 Answers4

32

Menu, Tools->Options

enter image description here

Christo
  • 8,729
  • 2
  • 22
  • 16
3

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

Community
  • 1
  • 1
manojlds
  • 290,304
  • 63
  • 469
  • 417
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.

Miguel Angelo
  • 23,796
  • 16
  • 59
  • 82
1

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.

Jess
  • 2,991
  • 3
  • 27
  • 40