Export (0) Print
Expand All

Spectrum of Visual Studio Automation

Visual Studio offers three levels of extensibility: macros, add-ins and wizards, and the Visual Studio SDK.

Macros are the most basic way to extend the Visual Studio integrated development environment (IDE) by using code. Not only do macros let you record several actions in the IDE and play them back as just one command, they also let you learn the Visual Studio Automation model when you record them. Macros also have a development environment named the Macros IDE, which is based on the Visual Studio IDE and uses the Visual Basic language. You can use the Macros IDE to create, modify, and debug macros. For more information about macros, see Automating Repetitive Actions by Using Macros.

Add-ins are time-saving and labor-saving applications that attach to and are used in the IDE. They are COM objects that implement the Extensibility interface and communicate with the IDE through the core Automation object model, which is contained in the EnvDTE assemblies. The toolbar model is contained in Microsoft.VisualStudio.CommandBars.

The various programming languages in Visual Studio provide additional automation objects through their own assemblies. Some of the project-specific automation assemblies are shown in the following table.

Assembly Name

Description

VSLangProj

Visual Basic and Visual C# project automation model.

VSLangProj2

Visual Basic and Visual C# project automation model.

VSLangProj80

Visual Basic and Visual C# project automation model.

VslangProj90

Visual Basic and Visual C# project automation model.

VslangProj100

Visual Basic and Visual C# project automation model.

Microsoft.VisualStudio.VCCodeModel

Visual C++ code automation model.

Microsoft.VisualStudio.VCProject

Visual C++ project automation model.

Microsoft.VisualStudio.VCProjectEngine

Visual C++ project automation model.

Microsoft.VisualStudio.VsWizard

Visual C++ wizard automation model.

Because add-ins are compiled binary code, your intellectual property is protected. You can implement add-ins in any COM-consuming language, for example, Visual C++, Visual Basic, and Visual C#.

For many developers, macros are sufficient for programming against the Visual Studio Automation model. However, add-ins can be preferable for developers such as ISVs who want to add entire new features to the IDE. Add-ins fit such features into the Visual Studio IDE as though they were built-in.

Add-ins also let you do the following things that you cannot do by using macros:

  • Host your tool on a menu or toolbar in the IDE.

    This lets you easily access it while you are programming.

  • Create custom property pages for the Options dialog box.

    For more information, see How to: Create Custom Options Pages.

  • Create tool windows that act just like Visual Studio tool windows.

    For more information, see Creating and Controlling Environment Windows.

  • Dynamically enable and disable commands on menus and the Visual Studio Command bar.

    For more information, see How to: Add and Handle Commands.

  • Add contact and descriptive information to the Visual Studio About dialog box.

Wizards are applications that lead users through a step-by-step process of creating programs or accomplishing programming tasks. For example, Visual Studio offers the Add-In wizard to help users create an add-in project and deployment project. You can create your own wizards by building a project that implements the IDTWizard interface. Wizards are typically invoked by using the New Project dialog box or New File dialog box.

Macros, add-ins, and wizards meet the needs of many users. However, some users may have to go beyond the Visual Studio Automation model. For example, a user might want to incorporate an entirely new editor or programming language into the Visual Studio IDE. To accomplish this, these elements may be required:

  • A new project type

  • A customized editor

  • Advanced debugging features

The Visual Studio SDK was created so that you can extend Visual Studio in this manner. The Visual Studio SDK provides tools and information to help you integrate your products into Visual Studio. The Visual Studio SDK is a developer suite and platform. It gives you finer and more extensive control over the IDE by providing access to more interfaces. By using the Visual Studio SDK, you can provide greater functionality for users of your extensions. For more information, see Visual Studio Extensibility Developer Center on the MSDN Web site. You can also download the Visual Studio SDK from that site.

Community Additions

ADD
Show:
© 2014 Microsoft