einaregilsson / StopOnFirstBuildError

Visual Studio extension to stop solution build immediately after a projects fails to build.
http://einaregilsson.com/stop-build-on-first-error-in-visual-studio-2010/
51 stars 17 forks source link

Problem merging patch for duplicate Build.Cancel events #5

Closed tekskater closed 10 years ago

tekskater commented 10 years ago

I'm opening a separate issue for this in case you did not see that I commented to the issue that was closed. The latest release has a bug that will prevent it from functioning correctly:

It doesn't look like the patch was merged correctly. The "_canExecute = false;" at line 204 needs to be deleted otherwise the extension won't actually cancel the build if there is a failure.

Thanks.

einaregilsson commented 10 years ago

Yeah, saw the other one, just haven't had time to fix it yet. I merged the patch in manually on my work machine which is the only machine I have with VS2010 installed (the extension supports 2010 and I'm not sure if I upgrade the project to 2013 it's still gonna work in 2010) and then just briefly tested in 2010 and it worked there so I published.

Will try to get it merged properly tomorrow and publish another new version.

tekskater commented 10 years ago

It seems strange to me that version 1.4 could work at all in its current state because if _canExecute is set to false before the call to _dte.ExecuteCommand(CancelBuildCommand), then buildCancel_BeforeExecute should prevent the Build.Cancel command from actually executing.

Did you actually verify that version 1.4 of the extension automatically cancels a failing build? If it really does still work, then I can only assume that buildCancel_BeforeExecute is not getting called somehow.

I have modified my local copy as per my original patch and have tested it in the debugger to verify that all events are triggered and handled as expected with VS 2012. I don't have access to either VS 2010 or 2013 to try those, though.

einaregilsson commented 10 years ago

Version 1.5 now published with line 204 removed. Seems to work fine in VS2012 on a large solution with many projects. Thanks again :)

tekskater commented 10 years ago

Thanks for the quick turn-around.