This C# project template will help set up the environment in Visual Studio for PowerShell ISE Add-On development. Please note that this template will only work in Visual Studio 2012 and 2013. However, if you would like to use this template in Visual Studio 2010, I have created a similar template which can be downloaded from here. As per the release notes for the 2010 version, the template is extremely simple and is based off the exisiting 'WPF User Control Library' project template. Firstly, it adds a project assembly reference to the Microsoft.PowerShell.GPowerShell.dll that is located in the GAC, and the main file, UserControl1.xaml.cs, has also been changed to implement the IAddOnToolHostObject interface. Instructions: Once you have downloaded and installed this Visual Studio Extension, if you click File->New Project you should see the PowerShell ISE Add-On project type listed under the root node for C# (see screenshot below).
After you have created and compiled your project, you will still need to add the resulting .dll into your ISE by using: Add-Type -Path ‘c:\path\to\your\dll’. For further details on building ISE Add-ons, please refer to Jason Stangroome's excellent post at http://blog.stangroome.com/2012/01/16/create-a-powershell-v3-ise-add-on-tool/. If you have any questions, issues or feature requests, please let me know! |