Visual Studio 2015 (C ++): Stop compiling on the first build error (not the first project)

How to stop compiling Visual Studio 2015 when a compilation error is detected?

I mean the first build error (maybe the first .cpp ), and not the first project , because it takes too much time. (I have only 1 project.)

An extension named " StopOnFirstBuildError " is not a response,
because he stops at the first project that has an error.

Question

(in details)

When I hit F5 or Ctrl + Shift + B , the compiler will compile all (or some) of the files.
In my case, it can detect some errors using only 5 seconds, so I want it to stop compiling NOW.
However, VS 2015 is becoming unresponsive.
He also has strong resistance against Ctrl + Break .
I need about 30 seconds before I can go to the place of the error.
How to automatically stop the compilation process on the first compilation error?

Story

There is an old thread that is being asked about this in Visual Studio 2008.
His most acceptable solution is to switch to: -

 Visual Studio -> Tools -> Macros -> Macro IDE... (or ALT+F11) 

and paste in a specific piece of code .

However, the macro is no longer supported in VS 2012 .
(I tried to press Alt + F11 in VS 2015, the macro / menu editor does not appear.)

The claim is consistent with the issue for VS 2010 , stating that the above trick does not work.

The solution for question VS2010 is to install an extension named " CancelFailedBuild " .

So I downloaded it.
When .vsix (the installer) is .vsix , he said: Msgstr "This extension is not installed on any installed products." ... it makes sense because the extension says "Works with: Visual Studio 2010, 2012."

Now I think that I have one choice: -
Use a macro (the old VS 2008 method) by installing Macro Extension .
(The extension is the result of users complaining about the loss of the old macro function .)

Is downloading an extension a good idea?
If so, what is the step after that? Is there any code I have to copy-paste?
If not, then what is easier?

Sorry for posting a large number of hyperlinks.

Bypass

The following are approaches that may alleviate some of the inconvenience, but do not answer the actual question at all.

  • Install a patch that makes Visual Studio responsive , so Ctrl + Break works.
    This requires me to press the keyboard manually.
    It works only for Windows 7. (not tested)

  • Reduce compilation time by creating a simple .cpp layout, then compiling just that single file .
    This is useful for some cases.

+7
c ++ visual-studio-2015
source share
1 answer

The solution for VS2010 is to install an extension named "CancelFailedBuild".

...

This extension is not installed on any currently installed products.

... it makes sense because the extension says that "Works with: Visual Studio 2010, 2012."

Visual Studio 2012 extensions are often compatible with VS2013 and VS2015. You can update the extension yourself by unzipping the .vsix file (this is only a ZIP archive) and update its manifest (which is an XML file).

This guide shows you the XML elements that you need to change.

+4
source share

All Articles