Visual Studio 2008 中的 Visual Studio 2010(测试版 2)解决方案

发布于 2024-08-20 06:27:41 字数 163 浏览 5 评论 0原文

有没有办法在 Visual studio 2008 中打开保存在 Visual studio 2010 beta 2 中的解决方案文件? ...或者也许有一种转换它的方法?

当我尝试在 VS 2008 中打开它时,出现错误,提示“所选文件是解决方案文件,但由该应用程序的较新版本创建,无法打开。”

Is there a way to open a solution-file saved in Visual studio 2010 beta 2 in Visual studio 2008?
... or maybe a way to convert it?

When i tried to open it in VS 2008 i get an error saying "The selected file is a solution file, but was created by a newer version of this application and cannot be opened."

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

当爱已成负担 2024-08-27 06:27:41

如果您在文本编辑器中打开 .csproj 文件(它只是 XML),您将看到如下行:(

<ProductVersion>9.0.30729</ProductVersion>

来自 VS 2008 项目)

The first line of a 2008 .sln 文件内容如下:

Microsoft Visual Studio 解决方案文件,格式版本 10.00

2010 版本号将有所不同 - 只需将它们更改为这些值(或在系统上创建新的 2008 项目时获得的值)。

只需先备份文件即可。

If you open up the .csproj file in a text editor (it's just XML) you'll see a line like:

<ProductVersion>9.0.30729</ProductVersion>

(this is from a VS 2008 project)

The first line of a 2008 .sln file reads as follows:

Microsoft Visual Studio Solution File, Format Version 10.00

The 2010 version numbers will be different - just change them to these values (or the ones you get from creating a new 2008 project on your system).

Just take a backup of the files first.

少女净妖师 2024-08-27 06:27:41

不支持在 2008 年打开使用 2010 年创建的 .sln 文件。尝试使用较旧版本的 Visual Studio 打开较新版本的 Visual Studio 中保存的任何 .sln 文件时都会出现这种情况。

您可以做的是在记事本中打开 .sln 文件并将版本号减 1。这将允许您打开 .sln 文件,但操作仍然可能会失败,因为您必须将所有项目转换为出色地。

It is not a supported scenario to open a .sln file created with 2010 in 2008. This is true for trying to open any .sln file saved in a newer version of Visual Studio with an older one.

What you can do is open up the .sln file in notepad and decrement the version number by 1. This will allow you to open the .sln file but the operation will still likely fail as you'll have to convert all of the projects as well.

烛影斜 2024-08-27 06:27:41

今天我就遇到了这个问题。我所做的就是创建一个 VS2008 项目,然后简单地将其他项目的文件添加到其中。大多数 2010 年编写的代码实际上并没有使用 2010 年的功能——至少对于我正在查看的代码来说,它导入文件没有任何问题。

I fought with this very problem today. What I did was create a VS2008 project and simply added in the files from the other project. Most code written in 2010 really doesn't use 2010 features--at least for the code I was looking at it imported the files without any problems.

梦在深巷 2024-08-27 06:27:41

Visual Studio 的项目和解决方案文件是纯文本。

您需要在文本编辑器中打开 .sln.csproj 文件,将 VS2010 版本与 VS2008 版本进行比较,并修改版本号以匹配。

Visual Studio's project and solution files are plain text.

You need to open the .sln and .csproj files in a text editor, compare the VS2010 versions to VS2008 versions, and modify the version numbers to match.

花开半夏魅人心 2024-08-27 06:27:41

您必须比较版本之间的 .sln 和 .*proj 文件架构。我知道 2003 年到 2008 年的结构有很大不同。最后,您最好创建一个新项目并在两个项目之间复制文件

You'd have to compare the .sln and .*proj files schemas between the versions. I know that the structure is dramatically different from 2003 to 2008. In the end, you are better off creating a new project and copying the files over between the two

默嘫て 2024-08-27 06:27:41

为什么不手动创建一个新的 VS2008 解决方案并添加源代码,而不是修改 .sln 文件。请记住,VS2010 是早期测试版,尚未准备好,并且由于越来越多的人抱怨它,发布时间表已被推迟。

希望这有帮助,
此致,
汤姆.

Why not create a new VS2008 solution manually and add in the source code instead of hacking at the .sln file. Remember VS2010 is early beta and not ready and the timeline for release has been pushed back due to the growing number of people complaining about it.

Hope this helps,
Best regards,
Tom.

压抑⊿情绪 2024-08-27 06:27:41

虽然其他用户所说的是正确的,但如果项目包含 or (可能不是 100% 准确,但要寻找类似的内容),

您将需要删除它们,因为 3.5 客户端的语法与 VS2010 中的 4.0 客户端不同,比2008年。

While what other users have stated is true, if the project contains or (may not be 100% exact but look for something along those lines)

You will need to remove them as the syntax for 3.5 client, and 4.0 client is different in VS2010, than in 2008.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文