Going back in time - Converting a VS2008 csproj to VS2005
2008-08-04 10:23
357 查看
I had the need to migrate an Ajax project created in VS2008 consisting of several class libraries back into a larger project created and built with VS2005. I'm not ready to convert that project into VS2008 just yet.
I preferred to just convert the csproj files back to VS2005 format and add them to the existing VS2005 project. I discovered a few easy steps that can allow you to do this. Note: I had already converted (most) of the project files to use .NET 2.0. If you are using Ajax extensions you will have to make your web.config align with this as well. Do this first in VS2008. Obviously if you are using any .NET 3.0 or .NET 3.5 features, this isn't going to work for you...
Next open the csproj file you want to change in Notepad.
Near the top is the Project node. If this contains ToolsVersion="3.5" remove this attribute:
<Project ToolsVersion="3.5" DefaultTargets=...
becomes
<Project DefaultTargets=...
A few lines down there is a <ProductVersion> node, change the value:
<ProductVersion>9.0.21022</ProductVersion>
becomes
<ProductVersion>8.0.50727</ProductVersion>
Near the bottom of the file, look for the <Import node, if it says MSBuildToolsPath, change "Tools" to "Bin" it:
<Import Project="$(MSBuildToolsPath)/Microsoft.CSharp.targets" />
becomes
<Import Project="$(MSBuildBinPath)/Microsoft.CSharp.targets" />
If there is another <Import node with an MSBuildExtensionsPath, delete this entire line.
Save the file and you should then be able to to open the file in VS2005. Don't double click on the file if you have both versions of Visual Studio installed, you will likely get the default VS2008 to load it.
[From:http://colinborrowman.spaces.live.com/Blog/cns!5BE1E6D14CDF840F!241.entry]
I preferred to just convert the csproj files back to VS2005 format and add them to the existing VS2005 project. I discovered a few easy steps that can allow you to do this. Note: I had already converted (most) of the project files to use .NET 2.0. If you are using Ajax extensions you will have to make your web.config align with this as well. Do this first in VS2008. Obviously if you are using any .NET 3.0 or .NET 3.5 features, this isn't going to work for you...
Next open the csproj file you want to change in Notepad.
Near the top is the Project node. If this contains ToolsVersion="3.5" remove this attribute:
<Project ToolsVersion="3.5" DefaultTargets=...
becomes
<Project DefaultTargets=...
A few lines down there is a <ProductVersion> node, change the value:
<ProductVersion>9.0.21022</ProductVersion>
becomes
<ProductVersion>8.0.50727</ProductVersion>
Near the bottom of the file, look for the <Import node, if it says MSBuildToolsPath, change "Tools" to "Bin" it:
<Import Project="$(MSBuildToolsPath)/Microsoft.CSharp.targets" />
becomes
<Import Project="$(MSBuildBinPath)/Microsoft.CSharp.targets" />
If there is another <Import node with an MSBuildExtensionsPath, delete this entire line.
Save the file and you should then be able to to open the file in VS2005. Don't double click on the file if you have both versions of Visual Studio installed, you will likely get the default VS2008 to load it.
[From:http://colinborrowman.spaces.live.com/Blog/cns!5BE1E6D14CDF840F!241.entry]
相关文章推荐
- vs2008工程拷贝新机器编译Unable to find manifest signing certificate in the certificate store
- error C3163 in VS 2008
- Just-In-Time Debugging in Visual Studio 禁止VS在服务器上调试
- Back in time
- Compile- vs load-time weaving performance in Spring
- Error error PRJ0002 : 从“cl.exe”返回的结果有误 in VS 2008
- How to resolve errors opening currentsettings.vssettings in the final release of VS 2008
- getTimeInMillis() vs. DateTime.Now.Ticks——Java 和 .NET 获得毫秒级长整型数值的差异和解决 转
- KR C vs ANSI C (error C2143: syntax error : missing ';' before 'type' in Visual Studio 2008)
- Strong Authentication with One-Time Passwords in Windows 7 and Windows Server 2008 R2
- Comparing cursor vs. WHILE loop performance in SQL Server 2008(ZThttp://stackoverflow.com/questions)
- win7 "ClassFactory cannot supply requested class" in VS 2008的错误解决方法
- Measure time in Linux - getrusage vs clock_gettime vs clock vs gettimeofday
- K&R C vs ANSI C (error C2143: syntax error : missing ';' before 'type' in Visual Studio 2008)
- getTimeInMillis() vs. DateTime.Now.Ticks——Java 和 .NET 获得毫秒级长整型数值的差异和解决
- Steps to Create Setup and Deployment Project in Dot Net VS 2008
- VS.NET 2005 wince SDK installed in vs.net 2008
- 海洋工作室——网站建设专家:jQuery Intellisense in VS 2008
- getTimeInMillis() vs. DateTime.Now.Ticks——Java 和 .NET 获得毫秒级长整型数值的差异和解决
- getTimeInMillis() vs. DateTime.Now.Ticks——Java 和 .NET 获得毫秒级长整型数值的差异和解决