VS.Net... Cancel A Failed Build
I only recently came across this Visual Studio Hack by Michael Wood to fix one of the single most irritating problems with both Visual Studio 2003 and Visual Studio 2005.
[Rant] How Microsoft continue to screw this up is beyond me - do they ever actually use their own products outside of their single assembly demos showing drag/dropping of connections onto forms? Why on earth when you have a referenced project failing to compile would you want to continue trying to compile everything underneath, ending up with screens of irrelevant errors and a Task List that is completely useless? [/Rant]
This macro is an absolute must have in your IDE... just add to the MyMacros -> EnvironmentEvents module (you may already have the WithEvents declaration):
Public WithEvents BuildEvents As EnvDTE.BuildEvents
Private Sub BuildEvents_OnBuildProjConfigDone( _
ByVal Project As String, ByVal ProjectConfig As String, _
ByVal Platform As String, ByVal SolutionConfig As String, _
ByVal Success As Boolean) _
If Success = False Then
'The build failed...cancel any further builds.