How to: Update Visual Studio 2005 Add-ins To Visual Studio 2008
You can migrate your Visual Studio 2005 add-ins to make them compatible with the Visual Studio 2008 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 2008
On a computer that has Visual Studio 2008 installed, export the registry key at HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\AddIns\<youraddinname>.<yourclassname>.
Open the registry key and change the path to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\AddIns\<youraddinname>.<yourclassname>.
Copy the registry key to a computer that has Visual Studio 2008 installed and double-click it to add the entry to the registry.
Copy the entire solution folder to a computer that has Visual Studio 2008 installed.
Start Visual Studio 2008 and open the solution.
The Visual Studio Conversion Wizard starts.
Use the Visual Studio Conversion Wizard to convert the project to the Visual Studio 2008 format.
If you have a deployment project, open it 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\8.0\Addins\<youraddinname>.<yourclassname> and rename it to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.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 9.0 version.
Search through project documents for 8.0 and update version information to 9.0.
Add a reference to the EnvDTE90 assembly.
Change references from the DTE object to the DTE2object.
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 2008
Copy the entire solution folder that contains the managed add-in to the computer that has Visual Studio 2008 installed.
Start Visual Studio 2008 and open the solution.
The Visual Studio Conversion Wizard starts. Use this to convert the project to the Visual Studio 2008 format.
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 2008. The path may be similar to \Program Files\Microsoft Visual Studio 9\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 9\Common7\IDE\devenv.exe.
Add a reference to the EnvDTE90 assembly.
Change references from the DTE object to the DTE2 object.
This provides access to new functionality.
Open the .addin file and change all version number values from 8.0 to 9.0.
Review the code to confirm it is updated.
Make a copy of the .addin file and place it in \My Documents\Visual Studio 2008\Addins\
Edit the copied file and change the value of the <Assembly> element to point to the .dll file in the \bin directory of the project that contains your add-in.
Rebuild the solution and run the add-in in debug mode.
Change History
Date |
History |
Reason |
---|---|---|
July 2008 |
Added procedure steps to update and port the .addin needed to load the migrated Add-in. |
Customer feedback. |