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
精彩评论