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
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>.
Open the registry key and change the path to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\AddIns\<youraddinname>.<yourclassname>.
Copy the registry key to a computer that has Visual Studio 2005 installed and double-click it to add the entry to the registry.
Copy the entire solution folder to a computer that has Visual Studio 2005 installed.
Start Visual Studio 2005 and open the solution.
The Visual Studio Conversion Wizard starts.
Use the Visual Studio Conversion Wizard to convert the project to the Visual Studio 2005 format.
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.
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.
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.
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.
Add a reference to the EnvDTE80 assembly.
Change references from the DTE object to the DTE2 object.
This provides access to new functionality.
Review the code to confirm it is updated.
Rebuild the solution and run the add-in.
To migrate a managed add-in to Visual Studio 2005
Copy the entire solution folder that contains the managed add-in to the computer that has Visual Studio 2005 installed.
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.
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.
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.
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\.
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.
Add a reference to the EnvDTE80 assembly.
Change references from the DTE object to the DTE2 object.
This provides access to new functionality.
Review the code to confirm it is updated.
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