This project is read-only.

This document outlines the steps necessary to successfully build the PowerGUI Visual Studio Extension

  1. Install the Visual Studio 2010 SDK - Link
  2. Install PowerGUI 2.1 - Link
  3. Run Visual Studio 2010 as administrator to ensure that the debug engine gets installed correctly while debugging
  4. If installed to a non-default location you will have to fix the references in the following projects
    1. PowerGUIVsx.Core
    2. PowerGUIVsx.Core.DebugEngine

Some things to note:
  • The extension is not loaded until a applicable file is open (PS1, PSM1 or PSD1)
  • The debug engine is not loaded until a debug session is launched
  • Sometimes the extension will not be loaded if a script was left open during the last Visual Studio session. Simply close and reopen the file to load the extension.

Visual Studio Debugging Tips
  • Launch the Visual Studio Experimental Instance: devenv.exe /rootsuffix:exp
  • Launch Visual Studio with logging enabled: devenv.exe /log <filename>

Project Definitions
  • PowerGUIVsx - This project is loaded by Visual Studio and contains the package definition. It is used to dynamically locate the PowerGUI installation and the required assemblies. It creates editor instances from a class defined in the PowerGUIVsx.Core project. This project cannot reference PowerGUIVsx.Core or PowerGUIVsx.Core.Debug because of the dynamic assembly loading.
  • PowerGUIVsx.Core - This project contains the editor that wraps the PowerGUI Script Editor control. It also handles launching the debugger.
  • PowerGUIVsx.Core.Debug - This project contains the debug engine. The debug engine is registered with Visual Studio the first time the extension is loaded. The file is copied to the PowerGUI installation folder because we do not handle loading this assembly. If it was not copied here it would not be able to find the necessary assemblies.

Last edited Aug 12, 2010 at 3:53 AM by AdamDriscoll, version 4


mossguy Apr 13, 2012 at 8:08 PM 
I don't understand. There aren't any step-by-step instructions on how I get this to work in VS. I have all of the prerequisites installed and have been using PowerGUI, but how do add the VS add-in? I downloaded it but there must be some mechansim to import into VS...