Udostępnij za pośrednictwem


Incorporating the Integrated Development Environment

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.

Configuring the IDE

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.

Starting 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.

For more information, see Host Configuration Registry Key Settings and How to: Register the Host Application.

Implementing Add-in Debugging

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.

See Also

Tasks

How to: Start the IDE

How to: Exit the IDE

How to: Enable Non-Destructive Debugging for Add-Ins

Walkthrough: Incorporating the IDE for a Managed Object Model

Concepts

Configuring the IDE

Integrating Help into the IDE

Add-In Debugging

Deploying the IDE and Runtime

Other Resources

Visual Studio Tools for Applications 2.0