How to open a solution in VS2k8 that has been migrated by VS2k10

by Gabriel Lozano-Moran 23. October 2009 13:37

When you open a solution file in Visual Studio 2008 that has been migrated by Visual Studio 2010 you will see this dialog:

image

How to change the solution so that it will open again in Visual Studio 2008? Open the .sln file in a text editor:

image

Modify the Format Version from 11.00 to 10.00 and that’s all you need to change. In the project files (.csproj) you will notice that Visual Studio 2010 also changed the value for the ToolsVersion attribute of the Project element to 4.0 instead of 3.5:

image

The version of MSBuild that Visual Studio 2008 uses, does not support the ToolsVersion 4.0 setting therefore it will be ignore and MSBuild treats the project files as if it had ToolsVersion 3.5. So you don’t need to change the ToolsVersion back to 3.5.

Note that Visual Studio 2010 actually changes more than this. It will for example remove the <TargetFrameworkVersion> elements from the configuration files. MSBuild uses the value specified in the .csproj files to determine which .NET FX is being targeted.

Tags:

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading