简体   繁体   English

Visual Studio 2010 无法打开 Visual Studio 2012 修改的 2010 解决方案

[英]Visual Studio 2010 cannot open a 2010 solution that Visual Studio 2012 modified

Basically, I had a project that was written with Visual Studio 2010 Express in C#, I then tried out using Visual Studio 2012 Express with that file, and now VS2010 says:基本上,我有一个用 C# 中的 Visual Studio 2010 Express 编写的项目,然后我尝试使用带有该文件的 Visual Studio 2012 Express,现在 VS2010 说:

"The selected file is a solution file, but was created by a newer version of this application and cannot be opened." “所选文件是解决方案文件,但由此应用程序的较新版本创建,无法打开。”

Now when I had looked up about this, Microsoft said that you can still use 2010 if you do not use anything that was VS2012 specific.现在当我查到这个时,微软说如果你不使用任何特定于 VS2012 的东西,你仍然可以使用 2010。 Well, I had tried out the built in Testing that is in the VS2012, and that was the only thing that was VS2012 specific, but deleting that from my project (the Testing project), still left it saying that it was created by a newer version.好吧,我已经尝试了 VS2012 中的内置测试,这是唯一特定于 VS2012 的东西,但是从我的项目(测试项目)中删除它,仍然让它说它是由较新的人创建的版本。

So, how do you make a VS2010 solution that VS2012 modified work with VS2010 again?那么,如何让VS2012修改后的VS2010解决方案再次与VS2010配合使用呢?

VS 2010 的SP1 需要打开VS 2012 修改的解决方案。

Try this out:试试这个:

http://vsprojectconverter.codeplex.com/ http://vsprojectconverter.codeplex.com/

Personally I've never used it but I have it marked as a tool to use if I run into issues.就我个人而言,我从未使用过它,但我已将其标记为遇到问题时可以使用的工具。 Hope it helps!希望能帮助到你!

This probably isn't the kind of answer you are looking for, but it has worked for me in the past for compatibility issues and such, so it's worth mentioning.这可能不是您正在寻找的那种答案,但过去它在兼容性问题等方面对我有用,因此值得一提。 If your project isn't too complicated, you can create a new project then copy and paste everything across, starting with form controls, and then moving to the code.如果您的项目不太复杂,您可以创建一个新项目,然后复制并粘贴所有内容,从表单控件开始,然后移至代码。 It's a sloppy solution that doesn't scale well, but sometimes nothing else seems to work.这是一个草率的解决方案,不能很好地扩展,但有时似乎没有其他方法有效。

Andrew.Wu 这里的回复非常全面http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/fc763995-beed-4287-97de-6e47d3e87865以及解决问题的详细步骤

very old...but hope it can help someone...很老了...但希望它可以帮助某人...

Step 1: Go to your project location where the project's sln file is kept and then Right-click on it, choose "Properties".步骤 1:转到保存项目 sln 文件的项目位置,然后右键单击它,选择“属性”。 Uncheck "Read Only" as like given below:取消选中“只读”,如下所示:

Step 2: Again Go to the location where the project's sln file is kept and then Right-click on it to open it with notepad and change the "Microsoft Visual Studio Solution File, Format Version 12.00" to "Microsoft Visual Studio Solution File, Format Version 11.00" on the file.步骤 2:再次转到项目的 sln 文件所在的位置,然后右键单击它以使用记事本打开它并将“Microsoft Visual Studio 解决方案文件,格式版本 12.00”更改为“Microsoft Visual Studio 解决方案文件,格式版本 11.00”在文件上。

you can change also the "Visual Studio 2012" to 2010您还可以将“Visual Studio 2012”更改为 2010

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM