Choosing the Appropriate Automation Approach
Visual Studio provides several options for creating automation applications. The exact method to choose, however, depends largely on the impending task. To help guide you to the best method, consider the following factors.
-
Distribute code — Use a macro. You can deploy macros by copying a macro's project files to the new location. There is no setup or registration, but users of your macro must click the Tools menu, point to Macros, and then click Load Macro Project to start using them. You can also send a macro as text for use by others. For more information, see How to: Record Macros.
-
Distribute a compiled application — Use either an add-in or a wizard, or an application that uses the automation interfaces. Add-ins, wizards, and other applications that use the automation interfaces protect your intellectual property through compilation. However, to distribute them, you must use a deployment project or some other form of setup. For more information, see How to: Create an Add-in or Walkthrough: Creating a Wizard.
-
Visual Basic — You can create macros, add-ins, or wizards. For more information, see Automating Repetitive Actions by Using Macros or Creating Add-ins and Wizards.
-
Other languages — You can create add-ins and wizards by using the IDTExtensibility2 interface and the IDTWizard interface. You must be able to implement a CoCreate-able COM object in the programming language.
-
No user input is needed — A macro or add-in is suitable. For more information, see Automating Repetitive Actions by Using Macros or Creating Add-ins and Wizards.
-
Simple input — A macro, add-in, or wizard is suitable.
-
Complex input — If the input has many steps or requires verification, a wizard may be most appropriate.
-
An automated task — Macros, add-ins, and wizards can all be used to automate tasks. For more information, see Automating Repetitive Actions by Using Macros or Creating Add-ins and Wizards.
-
Custom property pages for the Tools, Options dialog box — Add-ins and wizards support this functionality. For more information, see How to: Create Custom Tools Options Pages. You can also create these using the Visual Studio 2005 SDK. For more information, see http://msdn.microsoft.com/vstudio/extend.
-
Custom tool or document window — Add-ins and wizards support this functionality. For more information, see How to: Create and Control Tool Windows. You can also create these using the Visual Studio 2005 SDK.
-
A new project type — Use the Visual Studio 2005 SDK.
-
Support for a new programming language in Visual Studio or a new editor — Use the Visual Studio 2005 SDK.