|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Creating Add-Ins and Wizards
To create a custom tool for a development task or to create a tool to help other programmers create their applications, you can use the Visual Studio .NET automation model. The automation model, known in previous versions of Visual Studio as the extensibility model, is a programming interface that gives you access to the underlying routines that drive the integrated development environment (IDE), allowing you to customize, manipulate, and automate it. For example, you can programmatically create projects and project items and automate the project build and deployment processes.
Note Extensibility is the capacity to enhance and extend the functionality of the IDE. Automation refers to user-created code and tools that automate tasks in the environment and programmatically drive the IDE.
You can access the automation model through Visual Studio .NET macros (VSMacros), by creating extensions to the IDE known as Add-ins, or by implementing new Add Item or Add Project wizards. Add-ins are compiled applications that manipulate the environment and automate tasks. Add-ins can be invoked in a variety of ways, including the Add-in Manager, toolbar commands or buttons, the devenv command line, and through events such as IDE startup. A variety of Add-in and VSMacro examples are available in the
samples\automation directory on the Visual Studio CDs.
In addition to the common object model provided by Visual Studio to all of its programming languages, tools, and packages, individual Visual Studio development languages can also offer their own unique additions to the automation object model to support their specific features and components. As a result, you can create an Add-in that works equally well with any Visual Studio language, or one that is tailored to support the special features of a particular language, such as Visual Basic or Visual C++.
|To learn more about||See|
|Recording and running macros||Automating Repetitive Actions by Using Macros|
|The three ways to access Visual Studio .NET Automation.||The Spectrum of Visual Studio .NET Automation|
|Functional groups of objects in the automation object model||Functional Automation Groups|
|Loading, unloading, and controlling Add-ins in the environment.||Controlling Add-Ins with the Add-In Manager|
|How to create Add-ins||Creating an Add-In|
|How to reference the EnvDTE namespace and obtain an instance of the DTE object.||Referencing the DTE Object|
|Registering an Add-in||Add-In Registration|
|Creating a Wizard||Creating a Wizard|
|Wizard (.vsz) files||VSZ Files|
|VSDir files, and how they affect the Add Item and New Project dialog boxes.||VSDir Files|
|How to programmatically create a new instance of Visual Studio .NET or attach to a specific instance of Visual Studio .NET that is already running.||Creating and Attaching to Another Instance of Visual Studio .NET|
|Issues related to running Visual Studio .NET 2002 and Visual Studio .NET 2003 side-by-side.||Side-By-Side Automation Compatibility Issues|
|What to change in your add-in setup project's registry after migrating it from Visual Studio .NET 2002 to Visual Studio .NET 2003.||Migrating Add-in Solutions from Visual Studio .NET 2002 to Visual Studio .NET 2003.|