views:

50

answers:

1

I'm moving one of my macros over to become a VS2010 extension. I have the line from the macro...

Dim items As EnvDTE.UIHierarchyItems = DTE.ToolWindows.SolutionExplorer.UIHierarchyItems

I've managed to get DTE - DTE dte = GetService(typeof(SDTE)) as DTE;

but it does contain a ToolWindows Property.

I tried using dte.Windows to get the solution explorer, and that sort of works, but the result doesn't have a UIHierarchyItems.

So in short, what's the best way to get a reference to the solution explorer?

+1  A: 

It's on DTE2, which is why you didn't find it. Just replace the as DTE with as DTE2.

Noah Richards