Imports EnvDTE Imports EnvDTE80 Imports EnvDTE90 Sub Main() Dim dte2 As DTE dte2 = System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE") End Sub