Visual Studio .NET Extensibility
Visual Studio .NET builds on an extensibility model that was first developed for Visual C++ 5. In Visual Studio .NET, the DTE object (DTE stands for Development Tools Extensibility) sits at the top level of an automation model that features nearly 200 objects.The functionality provided by the DTE object model can be described as user-defined customization. The DTE API is available to developers who are programming macros, wizards, and add-ins. Even more functionality is exposed to commercial-language developers who are part of the Visual Studio Integration Program (VSIP). (We'll discuss this program in more detail shortly.)The following sections describe the automation mechanisms available to developers who are customizing Visual Studio .NET.
Macros
The macros facility in Visual Studio .NET provides programmers with easy access to the features available through the automation APIs. The macros facility features its own Macro Explorer tool window (described earlier in the chapter), an extremely powerful macro recording facility, and a full-blown Macros IDE that is itself extensible through the DTE object model. We'll use macros to illustrate concepts relating to extensibility throughout the book. Chapter 4 covers creating and editing macros in the Macros IDE in detail.Macros in Visual Studio .NET are written in Visual Basic .NET. Because the macros facility takes advantage of .NET, macro programmers have access to the entire .NET Framework as well as to custom assemblies built in any other .NET language.To open the Macros IDE, just press Alt+F11 from inside Visual Studio .NET. The Macros IDE will open in a new window. The first thing you'll notice about the Macros IDE is that its layout is extremely similar to the layout of Visual Studio .NET itself. In fact, you'll find that most of the features available to you as a Visual Studio .NET programmer are available to you as a macro programmer.Figure 1-12 shows the Macros IDE in its default layout. This layout features a Project Explorer window that shows all of your currently loaded macro projects.
Figure 1-12. The Visual Studio .NET Macros IDE

Add-ins
Add-ins allow developers to create extensions to the Visual Studio .NET IDE and to the Macros IDE. In general, compiled add-ins provide better performance than Visual Studio .NET macros. Add-ins also provide functionality that integrates seamlessly into the environment. Independent software vendors (ISVs) and individual programmers can extend the IDE through add-ins in a way that makes the use of the add-in look just like a built-in part of the IDE.Add-ins can be written in any .NET language, or they can be written as native COM components in unmanaged Visual C++. Add-ins are required to implement the IDTExtensibility2 interface. Most of the add-in samples in this book will be shown in Visual C#. The book samples installed from the Web will be available in both C# and Visual Basic .NET.Microsoft makes available a number of add-in samples that you can use to explore the extensibility object model or simply to add functionality to your Visual Studio .NET IDE. The samples are available at http://msdn.microsoft.com/vstudio/downloads/automation.asp. We'll use a few of these add-ins in the early chapters of the book to add specific features to Visual Studio .NET. Starting with Chapter 5, we'll provide all the details you need to build your own custom add-ins.
Wizards
Visual Studio .NET wizards are similar to add-ins, but they are created using the ITDWizard interface. Wizards are fairly simple constructions that are designed to take a user step by step through a specific task.Wizards are used in Visual Studio .NET for a variety of purposes. Project wizards help get you started on a particular type of Visual Studio .NET project. Other wizards in the IDE, such as the MFC Event Handler Wizard shown in Figure 1-13, walk you through adding code to an existing project.
Figure 1-13. The Event Handler Wizard helps you add code to existing projects.

The Visual Studio Integration Program (VSIP)
We won't discuss VSIP much in this book because it's a specialized program with fairly substantial licensing fees. The program makes available to licensees APIs that are not part of the extensibility API discussed in this book. Developers who are part of the program can build custom editors and designers to integrate new .NET languages and high-end tools into the IDE.Companies that make specific integrated products include ActiveState (makers of Visual Perl .NET and Visual Python .NET), Compuware (which makes DevPartner Profiler), and Fujitsu (which makes NetCOBOL for .NET).You can find out more about VSIP at http://msdn.microsoft.com/vstudio/vsip/.