How to: Migrate Visual Studio .NET 2003 Add-ins to Visual Studio 2005

You can migrate your Visual Studio .NET 2003 add-ins to make them compatible with the Visual Studio 2005 environment. Migrated add-ins gain access to updated and new features.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. These procedures were developed with the General Development Settings active. To change your settings, choose Import and ExportSettings on the Tools menu. For more information, see Visual Studio Settings.

To migrate an unmanaged C++ add-in to Visual Studio 2005

  1. On a computer that has Visual Studio .NET 2003 installed, export the registry key at HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\AddIns\<youraddinname>.<yourclassname>.

  2. Open the registry key and change the path to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\AddIns\<youraddinname>.<yourclassname>.

  3. Copy the registry key to a computer that has Visual Studio 2005 installed and double-click it to add the entry to the registry.

  4. Copy the entire solution folder to a computer that has Visual Studio 2005 installed.

  5. Start Visual Studio 2005 and open the solution.

    The Visual Studio Conversion Wizard starts.

  6. Use the Visual Studio Conversion Wizard to convert the project to the Visual Studio 2005 format.

  7. Select the deployment project, myprojectnameSetup, and then select the Registry Editor in Visual Studio.

    The registry icon is on a toolbar at the top of Solution Explorer. This opens the associated registry key for the setup project.

  8. Open the registry key entry at HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\Addins\<youraddinname>.<yourclassname> and rename it to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Addins\<youraddinname>.<yourclassname>.

    This updates the deployment project.

  9. Confirm that there are no references to Microsoft.Office.Core.Commandbars in Office.dll.

    Search the project for "Office" and delete references. Add a reference to the Microsoft.VisualStudio.CommandBars assembly if CommandBars are used.

  10. Confirm that version number references to DTE are for the 8.0 version.

    Search through project documents for 7.0 and update version information to 8.0.

  11. Add a reference to the EnvDTE80 assembly.

  12. Change references from the DTE object to the DTE2 object.

    This provides access to new functionality.

  13. Review the code to confirm it is updated.

  14. Rebuild the solution and run the add-in.

To migrate a managed add-in to Visual Studio 2005

  1. Copy the entire solution folder that contains the managed add-in to the computer that has Visual Studio 2005 installed.

  2. Start Visual Studio 2005 and open the solution.

    The Visual Studio Conversion Wizard starts. Use this to convert the project to the Visual Studio 2005 format.

  3. Create an XML add-in registration file for the add-in.

    For more information, see Add-in Registration. See How to: Upgrade Visual Studio .NET 2003 Add-ins to Visual Studio 2005 by Using XML Registration (Managed) for a simpler version of the XML file.

  4. If the add-in contains references to Office.dll and contains the using Microsoft.Office.Core statement, delete both the reference and the statement. Add a reference to the Microsoft.VisualStudio.CommandBars assembly if the add-in uses command bars.

  5. Confirm that the path to the working directory is correct by opening the Project Properties Page and selecting the Debug Page. Update the path to the appropriate directory for Visual Studio 2005. The path may be similar to \Program Files\Microsoft Visual Studio 8\Common7\IDE\.

  6. Confirm that the Start Action on the Debug Page has the correct path for the Start external program option.

    This creates an instance of Visual Studio for running the debugger against the add-in. The path may be similar to \Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe.

  7. Add a reference to the EnvDTE80 assembly.

  8. Change references from the DTE object to the DTE2 object.

    This provides access to new functionality.

  9. Review the code to confirm it is updated.

  10. Rebuild the solution and run the add-in in debug mode.

See Also

Concepts

Migrating and Upgrading Add-ins from Visual Studio 2005 to Visual Studio 2008