开发者

Visual Studio 2010 extension get reference to solution explorer

I'm moving one of my macros over 开发者_Python百科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?


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜