
Keeping References to Microsoft.VisualStudio.Shell
If your project cannot be changed to use the Visual Studio 2008 Shell.9.0 and Shell.Interop.9.0, and must it keep references to Microsoft.VisualStudio.Shell from Visual Studio 2005 SDK, follow these steps.
To migrate a package that must keep Microsoft.VisualStudio.Shell
Unload the project file.
Right-click the project file, and then click Edit <myVSPackage>.csproj.
In the PropertyGroup element near the end of the project file, set UseVS2005MPF to true, and set RegisterWithRanu to false.
Save the project file and close it.
Close Visual Studio 2008.
In this case, the version of regpkg.exe from Visual Studio 2005 SDK is used to register the package. That version of Visual Studio 2005 SDK did not support Run As Normal User (RANU), which requires Visual Studio 2008 to be run under Administrator credentials. To run as Administrator, you must create a hive under HKLM_Local_Machine for an experimental version of Visual Studio.
To run as Administrator
To create the experimental hive in Windows Vista, open a Command Prompt window as Administrator, change to the directory where Visual Studio 2008 SDK is installed, and run the following command.
vsregex getorig 9.0 Exp
Restart Visual Studio 2008 as Administrator.
Now the package should build successfully, and an experimental instance of Visual Studio 2008 should open together with the new package.