Going back in time - Converting a VS2008 csproj to VS2005

 

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]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值