如何将VS2010解决方案转换为VS2008? [英] How to Convert VS2010 solutions to VS2008?

查看:70
本文介绍了如何将VS2010解决方案转换为VS2008?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将VS2010解决方案转换为VS2008?

How to Convert VS2010 solutions to VS2008?

推荐答案

Visual Studio 2010现在是我的默认IDE.它具有很多不错的功能.但是不幸的是,我的一些同事不愿意迁移到VS2010,因为它正处于beta阶段,或者他们不想让2个VS安装实例占用存储空间.
但是我不能只离开VS2010.不仅是因为它的新功能,还因为它以后无论如何都必须是默认的IDE,而VS团队需要找到尽可能多的错误和错误,并在RTM时将其全部修复. (VSTeam实际上确实确实听取了您的反馈.他们修复了我在VS2010 Beta 1中报告的所有10个错误.因此,为了更好,我希望您尝试更新到VS2010并查找尽可能多的错误并将其发送给反馈.)
现在让我们了解降级的真实情况.我不会解释如何从VS2008升级到VS2010,因为它已经自动执行了.但是,我宁愿进行相反的操作.
1.制作.sln文件的备份副本.这将导致两个解决方案.一个用于VS2010,另一个用于VS2008. .csproj文件根本不需要修改.
2.在文本编辑器中打开一个.sln文件(记事本非常有用).


在选定的文本中,您会看到类似上面的内容,其中版本为11.00,Visual Studio版本为2010.
3.编辑版本号.现在将其从11.00更改为10.00,将其更改为2010至2008.


然后保存.将解决方案文件重命名为solutionname-2008.sln和solutionname-2010.sln或类似的名称.
现在,您可以在旧版本的Visual Studio中打开它.
但是由于VS2010是我的默认IDE,所以我什至没有安装VS2008,而是只安装了VS2008 C#Express版本.您可以从VS2008 C#Express版本中打开它,但是将不会加载测试项目,并且解决方案文件夹将不起作用.除此之外,一切都可能会正常工作.
注意:在这两种解决方案中,都保留了诸如在VS2010或VS2008中添加新文件之类的任何更新,因为文件结构存储在.csproj文件中,该文件本质上与VS版本无关.
而且由于我的项目在.NET v3.5中已达到极限,因此在VS2008中一切正常.在VS2008下进行编译时,确实出现了一些警告错误.
项目文件包含ToolsVersion ="4.0",此版本的MSBuild不支持.将项目视为具有ToolsVersion ="3.5".
因此,由于它回到了3.5,仍然可以正常工作.您可以忽略警告.
Visual Studio 2010 has been my default IDE now. It has a bunch of cool features to work with. But unfortunately some of my colleagues are not comfortable in migrating to VS2010 as it is in beta stages or either they don’t want to have 2 instances of VS installation which takes up their storage.
But I couldn’t just leave VS2010. Not only because of its new features but also due to the fact that it has to be the default IDE later on anyways and VS team needs to find as much bugs and errors and fix them all by the time it RTMs. (VSTeam actually really does listen to your feedback. They fixed all my 10 bugs I reported in VS2010 Beta 1. So for the betterment I would like you to try updating to VS2010 and find as much bug as you can and send them feedbacks.)
Now lets get to the real thing of downgrading. I will not be explaining on how to upgrade from VS2008 to VS2010, because it already does automatically. But I will rather be going through on how to do the opposite.
1. Make a backup copy of your .sln file. It will result in two solutions. One for VS2010 and the other for VS2008. The .csproj files doesn’t need to be modified at all.
2. Open one of the .sln file in a text editor (notepad is more than fine).


You will see somewhat like the above in the selected text, where version is 11.00 and visual studio version is 2010.
3. Edit the version numbers. Now change it 11.00 to 10.00 and 2010 to 2008.


Then save it. Rename your solution files to solutionname-2008.sln and solutionname-2010.sln or something like that if you want.
Now you can open it in older version’s of Visual Studio.
But since my VS2010 is my default IDE, I didn’t even install VS2008 rather installed only VS2008 C# Express versions. You can open it from VS2008 C# Express Versions, but test projects will not be loaded and solution folders will not work. Besides that everything will most probably work fine.
Note: Any updates like adding new file in VS2010 or VS2008 is also maintained in both solutions, because the file structures are stored in .csproj file which is by nature VS version independent.
And since my projects are at max in .NET v3.5, it all works fine in VS2008. I did land up with some warning errors during compilation under VS2008.
Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5".
So since it goes back to 3.5 it still works fine. You can just ignore the warning.


尝试使用此解决方案转换器: SolutionConverter [ ^ ].

—SA
Try this Solution Converter: SolutionConverter[^].

—SA


这篇关于如何将VS2010解决方案转换为VS2008?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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