开发者

Visual Studio 2010: Building toolwindow on the fly in PowerShell

I would like to build a Visual Studio toolwindow "on the fly" from PowerShell code executed in a PowerShell host running inside Visual Studio, with access to $DTE. Any ideas if this is possible in Power开发者_Python百科Shell, and if so: how?


As far as I can tell, in order to call $DTE.Window.CreateToolWindow2 you need a UserControl class in an assembly (see MSDN). That's going to make it very hard to do usefully from PowerShell -- I mean, you can compile C#/VB code using Add-Type, but there's not much point in involving PowerShell.

You can create WPF UI's using PowerBoots as Oisin suggested, but the new ToolWindow stuff really seems to require an assembly.


Take a look at http://powerboots.codeplex.com for building WPF-based UI in powershell.

-Oisin

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜