This documentation is archived and is not being maintained.

What's New in Extensibility and Automation

Visual Studio .NET 2003

Visual Studio .NET includes a programmable, project-neutral object model that provides access to the underlying components and events of the integrated development environment (IDE). This model has components that represent solutions, projects, tool windows, code editors, debuggers, code objects, documents, and events. You can extend the functionality of the IDE, automate repetitive tasks, and integrate other applications into the IDE. The object model can be used through four programming methods: macros, add-ins, wizards, and the Visual Studio .NET Integration Program (VSIP).

What's New in Visual Basic .NET 2002

Visual Basic .NET 2003 includes the following features, which were introduced in Visual Basic .NET 2002.

The Object Model for Extensibility of Visual Basic and Visual C# Projects
While Visual Studio .NET provides a general extensibility model, there is also an object model that is specific to Visual Basic and Visual C# projects. This language-specific model, contained in the VSLangProj namespace, allows you to programmatically manipulate project attributes found only in Visual Basic and Visual C# projects. These items include:

For more information on the general extensibility model, see Creating Add-Ins and Wizards. For more information on the Visual Basic and Visual C# extensibility model, see Introduction to Project Extensibility in Visual Basic and Visual C#.

Record Macros
You can automate repetitive tasks using the macro-recording features. The macros are stored as Visual Basic .NET procedures that may be edited using the Visual Studio .NET Macros IDE. This allows developers to edit the macro and even use macros to learn about the extensibility object model. For more information, see Automating Repetitive Actions by Using Macros.
Write Macros
For more complex situations, you can write macros using Visual Basic .NET. You can use all the features of Visual Basic .NET in macros, including inheritance, structured exception handling, and the .NET Framework. For more information, see Automating Repetitive Actions by Using Macros. You have programmatic access to macro projects, too. For more information, see The Macro Project Object Model.
Organize Macros
The Macro Explorer in the Visual Studio .NET Macros IDE provides a hierarchical view of the available macros, which are organized into modules contained in macro projects. From this window, you can organize, edit, and run macros. For more information, see Macro Explorer Window.
Manipulate Code without Parsing
The project-neutral extensibility model, called the general extensibility model, provides access to the individual code files of your project. You can navigate to and examine a specific class method or class variable without having to parse the code. Go straight to the code element you want to modify using the CodeModel Object, get its location in the Document Object, and examine and modify your code. For more information about using these models with Visual Basic and Visual C#, see Working with the CodeModel Object of a Visual Basic Application, and Working with the CodeModel Object of a Visual C# Application.
Add-ins are extensions to the IDE. They are compiled components 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 events such as IDE startup. Add-in projects implement the IDTExtensibility2 interface. The power of add-ins rests in the fact that:
  • You have access to all the features of .NET to modify the IDE.
  • You can write add-ins using any of the programming languages included with Visual Studio.
  • Add-ins are compiled, and therefore your code is not exposed as it is in macros.

The Add-In Wizard is provided to create skeleton add-in projects. For more information, see Creating an Add-In.

Wizards are components that implement the IDTWizard interface. These applications lead users step-by-step to complete a task. For more information, see Creating a Wizard.
Visual Studio .NET Integration Program (VSIP)
Even more complex extensions to the IDE are possible through the VSIP. This program gives you access to additional objects and interfaces that let you create your own project types and designers. For more information, see The Spectrum of Visual Studio .NET Automation.

See Also

What's New in Visual Basic and Visual C# | What's New in the Visual Basic Language | What's New in Visual Studio .NET | Programming with Office