您的位置:首页 > 编程语言 > Go语言

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]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐