一个人如何转换一个Visual Studio .NET 2008解决方案到Visual Studio .NET 2005? [英] How does one convert a Visual Studio .NET 2008 solution to Visual Studio .NET 2005?

查看:118
本文介绍了一个人如何转换一个Visual Studio .NET 2008解决方案到Visual Studio .NET 2005?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设一个解决方案只包含类和这些类都写入到.NET 2.0规范。如果该解决方案是要打开,转换和保存在Visual Studio 2008中,才有可能与一些最起码的修改.sln文件后重新打开解决方案在Visual Studio 2005?



怎么总会有去这样做?



是否有一个工具,将向下转换的.sln文件,2008年至2005年,如果所有包含在解决方案中的类都已经写入到.NET 2.0规格?


解决方案

Uusally,你需要的.sln文件做的唯一事情是在文件的顶部更改版本号



您CS项目文件也将几乎确定,如果他们不,有可能调整他们,使他们与2005年和2008年

我们跑了两个解决方案文件(05和08)共享同一组的CS项目文件一段时间。



< 。p>要知道,虽然,你不能共享两个版本是这样的VC项目文件



好办法的项目文件如下:<在VS2008创建/ p>

CS项目将包含行:

 <导入项目=$(MSBuildToolsPath)\Microsoft.CSharp.targets/> 



VS2005会噎死这一点,你需要将其更改为以下内容:

 <导入项目=$(MSBuildBinPath)\Microsoft.CSharp.targets/> 



后者将与两个2005和2008的工作。


Assume that a solution only contains classes and that those classes are all written to .NET 2.0 specifications. If that solution were to be opened, converted and saved in Visual Studio 2008, would it be possible to reopen the solution later in Visual Studio 2005 with some minimal modifications to the .SLN file?

How would one go about doing that?

Is there a tool that will "down convert" .SLN files from 2008 to 2005 if all of the classes contained within the solution are already written to .NET 2.0 specifications?

解决方案

Uusally, the only thing you need to do with .SLN files is to change the version number at the top of the file.

Your CS project files will also be almost OK, and if they're not, it's possible to tweak them so that they are OK with both 2005 and 2008.

We ran for a while with two solution files (05 and 08) sharing the same set of CS project files.

Be aware though, that you can't share VC project files between the two versions like this.

The 'tweak' for the project files is as follows:

CS Projects created on VS2008 will contain the line:

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

VS2005 will choke on this, and you need to change it to the following:

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

The latter will work with both 2005 and 2008.

这篇关于一个人如何转换一个Visual Studio .NET 2008解决方案到Visual Studio .NET 2005?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆