Introduction
Within Visual Studio 2010, there are two main ways to install add-ons that allow you to make modifications to a Visual Studio project. The first way is to use Visual Studio templates. Templates are a great way to duplicate work that you would commonly need to do such as add license information to the top of every class. Another way is to use add-ins. Add-ins typically run from the Visual Studio Tools menu and allows you to run a program to do something. In our case, we were writing a component for our customers that would modify the Windows Azure service config file, and add-ins seemed to be the best way to accomplish this. The main issue with add-ins is that they run from the Tools menu so if you want to be able to make changes to a project of the user's choice, there is no way to do this unless you actually ask the user which project to modify. This would give a very bad user experience. What would be best is if a user could right click on a project to launch the add-in. Surprisingly, we could find very little information on the subject. Luckily, it is quite simple. This tutorial will walk you through the process.
Using the Code
To get started, open Visual Studio 2010 and create a new project and choose Other Project Types | Extensibility | Visual Studio Add-in. Leave the Name as the default name MyAddin1, and press OK.
As you walk through the wizard, you can leave the defaults (including choosing C#), except in “Choose Add-in Options”, you will want to ensure that you have selected the first two options:
Read more: Codeproject