Migrating from VS 2005 to VS 2008 with Microsoft.VisualStudio.Shell references

Some customers have hit this issue so I wanted to blog about it in case other people ran into the same problem. I want to thank Deepankar, our Engineering Lead for investigating this issue.

 

If you build a project system as a VS package in Visual Studio 2005, you won’t be able to migrate the package to Visual Studio 2008 without recompiling the project. The reason for this is the ProjectAggregator2 has changed.

 

The ProjectAggregator2 is no longer a separate MSI install package and has been moved into the VS platform in Microsoft.VisualStudio.Shell.9.0.dll. It is no longer installed with the VS SDK that targets VS 2008.

 

If you open the Microsoft.VisualStudio.Shell.Flavor namespace, you will see the following interfaces:

· IvsProjectaggregator2

· IVsAggregatableProjectCorrected

· IVsAggregatableProjectFactoryCorrected.

These were moved from ProjectAggregator2 to the Shell DLL and you need to update the project references to take advantage of those instead of pointing to the FlavoredProjectFactoryBase.cs file under the ProjectBase folder.

 

To get you project working in Visual Studio 2008, follow these steps:

 

· Update the Package project to VS 2008 by loading the solution in VS 2008 and target .NET 3.5

· Update references by removing the reference to Microsoft.VisualStudio.Shell.

· Add a reference to Microsoft.VisualStudio.Shell.9.0 and Microsoft.VisualStudio.Shell.Interop.9.0

· Update the Project Base sources by removing the FlavoredProjectFactoryBase.cs file

· Recompile