I added this well documented macro to MyMacros, Environment Events in VS 2008 Macros in order to cancel failed builds:
Private Sub BuildEvents_OnBuildProjConfigDone(ByVal Project As String, ByVal ProjectConfig As String, ByVal Platform As String, ByVal SolutionConfig As String, ByVal Success As Boolean) Handles BuildEvents.OnBuildProjConfigDone
If Success = False Then
'The build failed...cancel any further builds.
DTE.ExecuteCommand("Build.Cancel")
End If
But it's not canceling my builds. I also set breakpoints to hopefully catch it firing but they are not hit either.
I also added this test macro but its not being fired either:
Private Sub BuildEvents_OnBuildBegin(ByVal Scope As EnvDTE.vsBuildScope, ByVal Action As EnvDTE.vsBuildAction) Handles BuildEvents.OnBuildBegin
Beep()
Beep()
End Sub
The "Allow macros to run" option is set.
Why is it not being fired? Why are my breakponts not being hit?
Thanks for your help