Search code examples
c++visual-studiovisual-studio-2013msbuild

How can I prevent Visual Studio from building my entire solution when one of the dependent libraries fails to compile?


I have a Visual Studio 2013 solution with several projects in it. There's a Core project and Engine project, which compile to static libs, and a final Game project which links those libraries.

If the Engine has a compile error in it, then that project fails to build. However, Game will still attempt to build and link, presumably using the existing / old Engine library file.

So, even though my build has a compile error, it still produces a final EXE. Is there any way I can stop this?

EDIT: Here are the options I am using to reference the first two projects from the final one. Perhaps I am doing something wrong here?

Reference Options

Linker Options


Solution

  • There seem to be StopOnFirstBuildError extension for that purpose. Found reference to it in the feature request