Export (0) Print
Expand All

What's New in Extensibility and Automation in Visual Studio 2005 

Visual Studio 2005

Visual Studio features a number of targeted, programmable object models. By using these models, you can access the underlying components and events inside the Visual Studio integrated development environment (IDE) and its projects. Each model contains types and members that represent solutions, projects, tool windows, code editors, debuggers, code objects, documents, events, and more. Consequently, you can extend the functionality of the IDE, automate repetitive tasks, and integrate other applications into the IDE. The object models can be accessed through any of four methods: macros, add-ins, wizards, and the Visual Studio Industry Partner (VSIP) program.

New For Visual Studio 2005

The Visual Studio automation models have the following changes and new features:

  • XML Add-In Registration   Rather than registering components in the Windows registry, you now use XML files to define the registration settings for add-ins. Simply copy the XML registration file to the appropriate folders for Visual Studio to find and load your add-in. The files contain comments that describe the various tags, which help you easily locate and edit their settings. When you create add-ins by using the Add-In Manager, this file is created automatically. For more information, see Add-In Registration.

  • DTE2.Toolwindows   The new EnvDTE80.ToolWindows object is also available as the EnvDTE80.DTE2.ToolWindows property. It improves the discoverability and usability of tool windows in the object model by providing easier access to the tool windows in the IDE in their native types. Visual Studio tool windows may be accessed through member properties. Other tool windows may be located with the new GetToolWindow function.

  • DTE.Toolwindows.CreateToolWindow2   The new CreateToolWindow2 method makes it easier to create your own custom tool windows that host user controls. A shim control is no longer required.

  • Managed code add-ins   The Add-In Wizard now supports C++ on the .NET Framework, as well as getting resources from managed satellite DLLs.

  • Managed tools options   There are new options on the Tools Options menu for managed code.

  • Add-In Wizard and Visual J#   The Add-In Wizard now supports creating add-ins by using Visual J# and Visual C++ 2005.

  • KeyPress events   The Editor automation model offers a new EnvDTE80.TextDocumentKeyPressEvents object which has two events to handle keystroke entries in the Editor: EnvDTE80.TextDocumentKeyPressEventsClass.BeforeKeyPress and EnvDTE80.TextDocumentKeyPressEventsClass.AfterKeyPress.

  • InsertNewLine method   The Editor automation model offers a new EnvDTE80.EditPoint2.InsertNewLine(System.Int32) method to insert lines into documents in the editor.

  • Solution Folders   Solutions can now contain Solution Folders in addition to projects. Solution Folders are project containers that allow you to better organize large applications.

  • Task List default navigation   You can now go directly to lines in code by double-clicking items in the Task List (Visual Studio) without having to provide additional code.

  • Synchronous Find   The EnvDTE80.DTE2.Find object offers a new property, EnvDTE80.Find2.WaitForFindToComplete, which enables you to specify whether a search is performed synchronously or asynchronously.

  • Tool window command bar support   Some tool windows include a toolbar for accessing their functionality. Although these toolbars are not available from the CommandBars collection on the DTE object, they are available on the Window object of the tool window.

  • Enhanced AddNamedCommand   The new EnvDTE80.vsCommandControlType parameter in AddNamedCommand2 now enables you to specify the style of a button, such as text only, icon only, or text and icon. You can also create additional types of controls to place in the toolbars and menus, such as listbox controls, editbox controls, and drop-down menu controls.

  • Localization   Sample macros are now localized, and the Add-In Wizard generates add-ins with the appropriate language. For example, if you are running Japanese Visual Studio, add-ins are created by using the Japanese templates (if they are available).

  • Add-In and Macro Security   You can now specify whether macros are allowed to run, whether add-ins are allowed to load, and where Visual Studio searches for .Addin configuration files. For more information, see Add-In Security and Macros Security and Sharing Issues.

  • New Command Bar Assembly   Command bar functionality has been moved to a new Visual Studio assembly, Microsoft.VisualStudio.CommandBars, eliminating dependence on the Microsoft Office library (Mso.dll). For more information, see CommandBar Changes for Visual Studio 2005.

  • Code Model Consistency   All the programming languages in Visual Studio use more of the core code model than previous versions, making for a more consistent programming experience.

  • Core Model Additions   A new assembly named EnvDTE80 contains a number of new automation members. For more information, see New Automation Members for Visual Studio 2005.

  • Language Model Additions   A new assembly named VSLangProj80 contains a number of new automation members for Visual Basic, Visual C#, and Visual J#. For more information, see New Automation Members for Visual Studio 2005.

  • More Example Code   More Help topics for the various automation object models now feature example code. Many of them have both Visual Basic and Visual C# code.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft