Incorporating the Integrated Development Environment

Visual Studio 2008

Visual Studio Tools for Applications provides an integrated development environment (IDE) that add-in developers can use to create and test add-ins. When you incorporate the IDE into the host application, you must decide how to handle these three areas:

How you would like to configure the Visual Studio Tools for Applications IDE.

How add-in developers will start the Visual Studio Tools for Applications or Visual Studio IDE.

How add-in developers will debug their add-ins.

Install the Visual Studio Tools for Applications IDE as part of your host application Setup program. For more information, see Deploying the IDE and Runtime.

You can configure the development environment by modifying IDE settings. For more information, see Configuring the IDE.

To provide support for add-in developers, you can add your own help content to the IDE. You can explain the host application's object model and other details that your customers need to develop add-ins. For more information, see Integrating Help into the IDE.

Depending on your requirements and implementation time, you can provide add-in developers with one or both of these ways to start the IDE:

Add code to the host application that starts the IDE from host application menu commands or from keyboard shortcuts such as ALT+F11. You can start the Visual Studio Tools for Applications IDE or the Visual Studio IDE.

Install a shortcut on the Start menu as part of your host application Setup program.

After the IDE opens, the add-in developer selects an add-in project template from the New Project dialog box and begins developing. Because the host application starts the IDE, you can also use a DTE object to start the IDE with a specific project template open, or to generate starter code in an add-in project source file. For more information, see How to: Start the IDE and How to: Exit the IDE.

Using the Visual Studio 2008 IDE

Add-in developers who have Visual Studio 2008 installed can use the Visual Studio 2008 IDE to develop add-ins. You must change the IDE integration code in your host application. For more information, see How to: Start the IDE.

Additionally, you must perform the following steps to install your project templates into Visual Studio:

Set three registry keys: VSCSProjectTemplatesLocation, VSCSProjectTemplatesLocation, and VSItemTemplatesLocation.

Run devenv.exe /setup to unpack the templates to the appropriate cache directory for Visual Studio.

You can choose from three different levels of debugging capabilities. The level you implement will define the debugging experience for the add-in developer. For more information, see Add-In Debugging.

If you implement the most complex level, which is non-destructive debugging with a running instance of the host application, you can also add code to the host application to record user actions and then use the DTE object to generate code in an open project. This type of recorded action is commonly referred to as a macro. Users can record actions and then replay these actions using the existing instance of the host application. For an example of this, see ShapeApp Samples (Visual Studio Tools for Applications). The ShapeAppMacroRecordingCSharp sample demonstrates how to enable a host application to record macros. For more information, see How to: Build and Run the ShapeAppMacroRecordingCSharp Sample.