13

UPDATE

Exact duplicate of VS2010 - How to automatically stop compile on first compile error

Basically when it's compiling I want it to immediately stop when it encounters the first error. What it currently odes is tries to build all the rest of the projects which in turn fail. Anyone know how to do this?

Thanks!

Community
  • 1
  • 1
Micah
  • 111,873
  • 86
  • 233
  • 325

3 Answers3

13

Check my answer here

I know this might be bit late, but if it helps anyone then they should install the extension VSColorOutput

Then go to Tools => Options => VSColorOutput => General => Set Stop Build on First Error to true.

Hope this helps, happy Debugging!

user13309289
  • 217
  • 2
  • 8
  • Note: I used this for some time now. It sounds like a good idea at first, because with C++ and MSVC I have to scroll around for the actual error for ages. But enabling this has it's own pitfalls. I had to routinely disable bad projects my colleges broke f.i. . I wish Microsoft would improve their compiler errors to be more concise. – One Man Monkey Squad Dec 06 '21 at 08:51
2

I don't think you will be able to get the exact behavior you're looking for. Visual Studio will either try to build all or one project but not short circuit after the first error.

You can get close to the behavior you want by building only a single project at a time. Right click on the project you want to build and select "Build". It will not attempt to build any other projects even if it compiles successfully.

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
-7

Here is a solution without having to install anything. As its building press ctl+break and it will halt the build.