Downgrade a VS 2008 .sln or .csproj to VS 2005(转)
Downgrade a VS 2008 .sln or .csproj to VS 2005
I just had to convert a Visual Studio 2008 Solution and Project to Visual Studio 2005, because we had to exchange sources with somebody who did not use VS 2008 yet.
Even though Microsoft (of course ) did not provide a wizard or automated tool for it, converting the solution is possible to do, if you know what you are doing. It is actually pretty straight forward. At least in my case... I really can't tell if it is always that easy.
All I had to do in the .sln file:
change
PLAIN TEXT
XML:
Microsoft Visual Studio Solution File, Format Version 10.00
to
PLAIN TEXT
XML:
Microsoft Visual Studio Solution File, Format Version 9.00
The .csproj is more complicated (showing changes as diff):
PLAIN TEXT
XML:
The "-" at the start of a line means remove from 2008 version and a "+" means add to 2005 version. For more explanation see Diff Section "unified format".
+++ C:/vsone/source/SoundEx.the/SoundEx.the/SoundEx.the.csproj.2005
--- C:/vsone/source/SoundEx.the/SoundEx.the/SoundEx.the.csproj.2008
@@ -1,14 +1,17 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
- <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{94E2C393-2BE5-411C-BAFF-892F2C049E06}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SoundEx.the</RootNamespace>
<AssemblyName>SoundEx.the</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -44,7 +47,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SoundexSystem.cs" />
</ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
--- C:/vsone/source/SoundEx.the/SoundEx.the/SoundEx.the.csproj.2008
@@ -1,14 +1,17 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
- <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{94E2C393-2BE5-411C-BAFF-892F2C049E06}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SoundEx.the</RootNamespace>
<AssemblyName>SoundEx.the</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -44,7 +47,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SoundexSystem.cs" />
</ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
The "-" at the start of a line means remove from 2008 version and a "+" means add to 2005 version. For more explanation see Diff Section "unified format".
Hope this helps in case you need to do the same.