visual-studio 如何将 C++ Visual Studio 2008 项目降级到 2005

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/609419/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:14:33  来源:igfitidea点击:

How Do I Downgrade a C++ Visual Studio 2008 Project to 2005

c++visual-studiovisual-studio-2008visual-studio-2005

提问by Brock Woolf

How can I downgrade a C++ Visual Studio 2008 project to visual studio 2005?

如何将 C++ Visual Studio 2008 项目降级到 Visual Studio 2005?

Maybe there is a converter program that someone knows of or otherwise a process that I can undertake. Thanks.

也许有一个有人知道的转换器程序,或者我可以进行的过程。谢谢。

回答by Michael Burr

I have no idea how well it works, but here's an open source converter tool:

我不知道它的效果如何,但这里有一个开源转换器工具:

that was an extension to the tool outlined in this article:

这是本文概述的工具的扩展:

回答by Andy White

I always hate to edit the .sln/proj files by hand, since they can be so picky and problematic. It might be easiest to just create a new project in 2005, and just copy all the code files back into it.

我总是讨厌手动编辑 .sln/proj 文件,因为它们可能非常挑剔且有问题。最简单的方法可能是在 2005 年创建一个新项目,然后将所有代码文件复制回其中。

回答by Juozas Kontvainis

Is your solution file in revision control system? Just see what modifications the upgrading to VS 2008 did to project and solution files and then undo them. There's not a lot of them.

您的解决方案文件是否在版本控制系统中?只需查看升级到 VS 2008 对项目和解决方案文件所做的修改,然后撤消它们。数量不多。

回答by dirkgently

You will need change the slnand vcprojfiles (including attributes like ToolsVersion, TargetFramework, ProductVersionetc). Some freeware may be available but I haven't heard very highly of them.

您将需要更改slnvcproj文件(包括类似的属性ToolsVersionTargetFrameworkProductVersion等)。可能有一些免费软件可用,但我对它们的了解并不高。

回答by dirkgently

Here is the open source that convert VS2008 project into VS2005.

这里是将VS2008项目转换为VS2005的开源。

http://www.emmet-gray.com/Articles/ProjectConverter.htm

http://www.emmet-gray.com/Articles/ProjectConverter.htm

回答by Roderick

You can use sedto do it, with the following script or something like it:

您可以使用sed来做到这一点,使用以下脚本或类似的东西:

s#Version=\"9.00\"#Version=\"8.00\"#g
s#<ProductVersion>9.0.21022</ProductVersion>#<ProductVersion>8.0.50727</ProductVersion>#g
s#<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>##g
s# ToolsVersion=\"3.5\"##g
s#MSBuildToolsPath#MSBuildBinPath#g

Put that in a text file called "downgrade_vc9_to_vc8.sed", then call it with:

将其放入名为“downgrade_vc9_to_vc8.sed”的文本文件中,然后使用以下命令调用它:

"C:\Program Files\GnuWin32\bin\sed.exe" -f "downgrade_sln_vc9_to_vc8.sed" "MyProject.vcproj" > "MyProject_VC8.vcproj"

回答by n0rd

You can delete .sln file, then open .vcproj in VS2005, then save it as new solution. Since all project options are held in .vcproj file, that should do.

您可以删除.sln 文件,然后在VS2005 中打开.vcproj,然后将其另存为新的解决方案。由于所有项目选项都保存在 .vcproj 文件中,所以应该这样做。