In my Visual Studio 2008 environment, I have added a macro to catch Solution Open events.
It is located in MyMacros -> EnvironmentEvents
Option Strict Off Option Explicit Off Imports System Imports EnvDTE Imports EnvDTE80 Imports EnvDTE90 Imports System.Diagnostics Public Module EnvironmentEvents <System.ContextStaticAttribute()> Public WithEvents SolutionEvents As EnvDTE.SolutionEvents Public Sub SolutionEvents_Opened() Handles SolutionEvents.Opened MsgBox("SolutionEvents_Opened") End Sub
End Module
I have tested this in the Macro Editor and it runs and displays an Message Box.
However, after saving this, restarting VS and then opening a Solution, the MessagesBox is not displayed. It looks like the SolutionEvents.Opened does not fire.
Any suggestions?