View Single Post
  #6  
Old 11-16-2004, 10:59 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,027
I was testing on Win XP, which explains why I couldn't reproduce it. I was able to reproduce this behavior on Win2K. Here's the fix:

Dim macro As VisBuildSvr.IMacro = Nothing

Try

macro = Builder.App.Macros(VisBuildSvr.MacroTypeEnum.vbldM acroTemporary).Add("TestMACRO", "", "", "", False)
Builder.App.Macros(VisBuildSvr.MacroTypeEnum.vbldM acroTemporary).Remove("TestMACRO")
Builder.LogMessage("TestTEXT", True)

Builder.LogMessage("Hello from VB.NET custom action in project ")
Builder.LogMessage([step].ExpProperty(Builder, "Msg"))
BuildStep = VisBuildSvr.StepStatusEnum.vbldStepStatSucceeded

Catch e As Exception

BuildStep = VisBuildSvr.StepStatusEnum.vbldStepStatFailed
Builder.LogMessage(e.Message)

Finally

' release our references to COM objects we use
System.Runtime.InteropServices.Marshal.ReleaseComO bject(Builder)
System.Runtime.InteropServices.Marshal.ReleaseComO bject([step])
If Not macro Is Nothing Then System.Runtime.InteropServices.Marshal.ReleaseComO bject(macro)

End Try
Reply With Quote