One of the SharePoint projects I am working on involves a Visual Studio 2008 solution that is used across several teams of developers.  I want to use Visual Studio 2010, but converting the projects would cause problems for anyone still using VS2008, and if everyone has to upgrade to VS2010 at the same time it will never happen.

Visual Studio does not support opening projects in multiple versions, and a search only came up with ways to maintain seperate projects, either manually or with some sort of sync process, which seems far too complicated.

Fortunately, it turns out that if the projects are simple enough, you can use them in both VS2008 and VS2010.  It may not work for web apps or test projects, but for class libraries (or WSPBuilder solution projects) you just need to make a couple of manual edits to each project file.

  • Remove the web app guid {349c5851-65df-11da-9384-00065b846f21} from ProjectTypeIds - this can be useful for adding WebForms designer support to WSPBuilder projects, but isn’t really necessary.
  • Change the ToolsVersion attribute on project element to 4.0 - This tells VS2010 that it is the current version and does not require upgrade, while VS2008 will see the invalid version number and fall back to 3.5 with only a warning.

Once the project files are  updated, simply create a new solution file for use in VS2010 and add the existing project files, which should now load without triggering the conversion wizard.