Chapter 51. Add-Ins

WHAT'S IN THIS CHAPTER?

  • Understanding the structure of add-ins

  • Creating add-ins

  • Testing and debugging add-ins

  • Deploying add-ins

As detailed in Chapter 50, Visual Studio add-ins are components that run within Visual Studio and extend its functionality via the Visual Studio automation model.

This chapter takes you through the process of creating a Visual Studio add-in that integrates with the Visual Studio IDE to display a tool window (that enables you to store some notes), perform actions in Visual Studio (copy selected text from the code editor), and handle Visual Studio events (capture the cut and copy command events from the code editor).

DEVELOPING AN ADD-IN

When you create a Visual Studio add-in project, the Add-in Wizard appears and helps you to create the appropriate structure and base functionality in your add-in based on your input to its questions. From there you are on your own to implement the functionality from this base framework. You start from the base that it gives you and gradually add functionality to make it a useful tool.

The Add-in Wizard

Start by creating a new project, using the Visual Studio Add-in project template in the Extensibility project category (under the Other Project Type category), as shown in Figure 51-1.

Figure 51-1

Figure 51-1. Figure 51-1

Note

You'll note that the Extensibility category also contains a Shared Add-in project template. This template ...

Get Professional Visual Studio® 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.