This is a mirror of official site: http://jasper-net.blogspot.com/

How to create a Visual Studio add-in that launches from the Project window

| Friday, April 8, 2011
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.

visual_studio_addin.png

Read more: Codeproject

Posted via email from Jasper-net

0 comments: