52.1. Introduction

Add-ins are actually COM components that run as a part of the Visual Studio IDE and let users use their functionality to extend Visual Studio features or automate something in the IDE. Add-ins integrate with the Visual Studio IDE and can't run separately from the IDE.

Previously you had to register the COM component for add-ins to work, but with the introduction of a new mechanism for add-ins Microsoft has tried to hide their COM nature. This simplifies the process of add-in development and deployment, making it more like regular .NET development.

You'll read more about the technical details of add-ins and their development, but for now it's worthwhile to know that add-ins can be developed by multiple .NET languages including Visual C#, Visual Basic, and Visual C++ (CLR and ATL). However, the development language for an add-in doesn't matter because the anatomy and structure is the same for all the languages.

One thing you need to understand is the application of add-ins and how they differ from macros and other extensibility options. This is because the variety of extensibility options and their similarities to other options may make it confusing for a developer to choose the most appropriate option for his development.

Add-ins are an integrated component of Visual Studio 2008 and have access to the automation model API via Development Tools Extensibility (DTE), so their functionality is restricted to what the DTE provides. As a result of this we can conclude that for the underlying functionality of Visual Studio, add-ins aren't a good choice and some other options, like VSPackages, should come into the play.

By the way, add-ins are generally a great and common way to extend Visual Studio because the DTE addresses the common requirements that users may have.

On the other hand, you may have some difficulty choosing between add-ins and macros. So, what are the differences, and what are the pros and cons of each one? Even though you will see a more detailed discussion of macros in Chapter 53, at this point it's worthwhile covering the differences between add-ins and macros.

Add-ins are COM components that can be deployed on all machines that have Visual Studio installed, but macros are just uncompiled code packages that are harder to deploy. Moreover, macros can't be integrated with the IDE and can only automate something for you, whereas add-ins can be integrated with the IDE and can also bring extensibility features to the IDE. In general, macros are a quick and easy way to automate some tasks in the IDE, and add-ins are a more professional way to automate complex scenarios and extend the IDE.

As you work with both macros and add-ins, develop some instances of each, and see some examples, you will build a good understanding of their differences. This will help you identify where you can best use either extensibility option.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.249.42