visual-studio 在同一系统上运行 Visual Studio 2005、2008 和 2010
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2564633/
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
Running Visual Studio 2005, 2008, and 2010 on same system
提问by thelsdj
I have around 50 projects in Visual Studio 2005 that I am building a new development machine for and I'd like to slowly move those projects to VS 2008 but also have 2010 available for select new projects.
我在 Visual Studio 2005 中有大约 50 个项目,我正在为其构建新的开发机器,我想慢慢地将这些项目移动到 VS 2008,但也有 2010 可用于选定的新项目。
Can this work? Are there any gotchas for this sort of setup? Any general advice for running multiple versions of Visual Studio on the same system would be greatly appreciated. Specifically related to managing a controlled migration of projects to new versions but being able to selectively keep some on old versions.
这能行吗?这种设置有什么问题吗?在同一系统上运行多个版本的 Visual Studio 的任何一般建议将不胜感激。具体涉及管理项目到新版本的受控迁移,但能够有选择地保留一些旧版本。
采纳答案by KTC
I've got 7.1, 8, and 9 installed at the same time (well, and VB part of 6 as well) and I've not really had a problem opening projects file in the wrong version. The Visual Studio Solution files is "associated" with a particular version even if they all have the same extension of .sln, as you can see from its little icon. Microsoft Visual Studio Version Selector seems to handle individual project files (.vcproj) fine as well.
我同时安装了 7.1、8 和 9(以及 6 的 VB 部分),而且我在打开错误版本的项目文件时并没有真正遇到问题。Visual Studio 解决方案文件与特定版本“关联”,即使它们都具有相同的 .sln 扩展名,正如您从它的小图标中看到的那样。Microsoft Visual Studio 版本选择器似乎也可以很好地处理单个项目文件 (.vcproj)。
The only thing I've had is the individual source code files not opening up in the latest version like I want, but that's easily fixed with the click of a little button in VS Opions.
我唯一拥有的是单个源代码文件没有像我想要的那样在最新版本中打开,但是通过单击 VS Opions 中的一个小按钮可以轻松修复。
Microsoft have thisto say:
微软有这样说的:
Visual Studio supports the installation of Visual Studio .NET 2002, 2003, ... on the same computer.
In general, you should install the earliest release of Visual Studio first, and then install subsequent versions of Visual Studio in the order in which they were released.
Visual Studio 支持在同一台计算机上安装 Visual Studio .NET 2002、2003...。
通常,您应该先安装最早版本的 Visual Studio,然后按照它们的发布顺序安装后续版本的 Visual Studio。
回答by John B
I have VC6, VB6, VS 2008, and VS2010 RC installed on Windows Vista. I cannot double click on the VC6 dsp files without VS2010 opening and asking to perform the conversion. The 2008 C# projects open in 2008 as long as I use the solution file. The 2008 project file opens in 2010 instead of 2008 even though the version selector is the default program. Most of the time I try to remember to open the desired version of Visual Studio and then open the project.
我在 Windows Vista 上安装了 VC6、VB6、VS 2008 和 VS2010 RC。如果不打开 VS2010 并要求执行转换,我就无法双击 VC6 dsp 文件。只要我使用解决方案文件,2008 年 C# 项目在 2008 年开放。2008 项目文件在 2010 年而不是 2008 年打开,即使版本选择器是默认程序。大多数时候我试着记住打开所需版本的 Visual Studio,然后打开项目。
You can mitigate some of these issues by changing the default program associations in the control panel or the registry.
您可以通过更改控制面板或注册表中的默认程序关联来缓解其中一些问题。
Update: This setup works on Windows 7 x64, with the addition of VS2013.
更新:此设置适用于 Windows 7 x64,并添加了 VS2013。
回答by wheaties
Make sure when you open up the 2005 files you're doing it in 2005. To open them in another would require a conversion which would render them incompatible with the older compiler set-up. To aid this, structure whatever workspace you're using into 2005, 2008, and 2010 so as to minimize accidental chance of this.
确保当您打开 2005 年的文件时,您是在 2005 年进行的。在另一个文件中打开它们需要进行转换,这会使它们与旧的编译器设置不兼容。为帮助实现这一点,请将您使用的任何工作区组织到 2005、2008 和 2010 年,以最大程度地减少意外发生的可能性。
Second, when you double click to open the projects, it will invariably attempt to open them with 2010. You'll have to start with VS#### instead of the solution/project unless you're in the 2010 workspace.
其次,当您双击打开项目时,它总是会尝试使用 2010 打开它们。除非您在 2010 工作区中,否则您必须从 VS#### 而不是解决方案/项目开始。
回答by Ray
I can't speak for 2010, but I have run 2005 and 2008 at the same time on my system without any fuss.
我不能说 2010 年,但我已经在我的系统上同时运行了 2005 年和 2008 年,没有任何大惊小怪。
And I made the double-click mistake that wheaties warns about more than once :(
而且我犯了wheaties不止一次警告过的双击错误:(
回答by Matthew Whited
Yes it can work. I'm not sure if you have to install them in a particular order... but install them in order of the versions... 2005, 2008, 2010. Should be good to go.
是的,它可以工作。我不确定您是否必须按特定顺序安装它们……但是按照版本的顺序安装它们……2005、2008、2010。应该很好。
回答by user608920
I also had the same doubt. I work at my company which is still on VS 2008 and I want to personally use the VS 2010 and not risk the 2008. I installed the 2010 and it worked fine with the 2008. Just make sure you note the projects that are in 2005 and open them with the same accordingly.
我也有同样的疑惑。我在我的公司工作,它仍然在 VS 2008 上,我想亲自使用 VS 2010 而不是冒着 2008 的风险。我安装了 2010,它在 2008 上运行良好。只要确保你注意到 2005 和相应地打开它们。
回答by SoftwareGeek
I have VS2005 & VS2008 running without any issues. I have had problems when working with betas, express editions & am assuming you don't have them.
我有 VS2005 和 VS2008 运行没有任何问题。我在使用 beta、express 版本时遇到了问题,我假设你没有它们。
I would say refrain from making too many changes to the setup of these editions, it should be fine.
我会说不要对这些版本的设置进行太多更改,应该没问题。
回答by William
The reason why it works is simple: if you open your solution file in Notepad, you'll see which version of VS is related to your project.
它工作的原因很简单:如果您在记事本中打开您的解决方案文件,您将看到哪个版本的 VS 与您的项目相关。

