开发者

Visual Studio 2008 BuildEvent Macros not Firing

开发者 https://www.devze.com 2022-12-10 18:21 出处:网络
I added this well documented macro to MyMacros, Environment Events in VS 2008 Macros in order to cancel failed builds:

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 S开发者_开发技巧tring, 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


Apparently you have to run Debug (green play button) in the Macros IDE for breakpoints to be hit.

Now I know.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号