安装 Visual Studio 2010 后,将 .vcproj 文件分配给 Visual Studio 2008
我遇到了一个奇怪的错误。我使用 Windows 7 x64。 Visual Studio 2010 (VS10) 和 Visual Studio 2008 (VS08) 均已安装。现在我想确保当我双击打开 .vcproj 文件时,它是由 VS8 而不是 VS10 打开的。现在这似乎是一个微不足道的问题,但是: “右键 -> 打开方式 -> 选择默认程序 -> 选择 VS08 的 devenv.exe -> 始终打开方式”不起作用。事实上,在浏览 VS08 的 devenv.exe 后,它并没有出现在应该显示的列表/菜单中。
这是非常奇怪和烦人的,也许有人已经遇到过这个错误并且知道解决方案。
I have encountered a strange error. I use Windows 7 x64. Visual Studio 2010 (VS10) and Visual Studio 2008 (VS08) are both installed. Now i want to make sure that when i doubleclick open a .vcproj file it is being opened by VS8 and not VS10. Now this seems like a trivial problem, but:
"righclick -> open with -> choose default program -> select devenv.exe of VS08 -> always open with" doesnt work. In fact after browsing for devenv.exe of VS08 it does not show up in the list/menue where it is supposed to be displayed.
This is very strange and annoying, maybe someone already encountered this error and know a solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我得到了它!至少对于 Express 版本来说是这样。我强烈怀疑这些说明可以修改以适用于完整版本。名字当然会改变。
我在这方面花费的时间比我通过点击正确的 IDE 所节省的时间要多得多,但该死的,我只是不想放弃。
事情是这样的。奇怪的是,这些关联似乎与程序文件名有关。 (你说,什么?在我看来确实是这样。)VC++ Express 2008 和 2010 都被命名为 VCExpress.exe。我们将为 2008 版本指定一个别名。我们还将使用分身来实施一些诡计。
导航到“C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE”。制作 VCExpress.exe 的副本(不是快捷方式),并将其重命名为 VCExpress-2008.exe。 (可能只需重命名原始名称并在步骤 3 中使用新名称即可。)
打开 regedit.exe。创建新项 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\VSExpress-2008.exe
编辑该项中的(默认)值,以保存字符串“C:\Program Files (x86)\Microsoft” Visual Studio 9.0\Common7\IDE\VCExpress.exe" [原文]
再次使用文件关联对话框进行演练。右键,打开方式,选择默认程序,yada,yada,yada。向下浏览至 C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE,然后单击 VSExpress-2008.exe。
VCExpress-2008 现在显示为一个信誉良好的程序,其图标自豪地显示在首页首屏上方。 (不要告诉对话框,但你我都知道它确实指向 VCExpress.exe,而不是我们制作的副本。)单击它。
庆祝。
I GOT IT! For the Express versions at least. I strongly suspect these instructions can be modified to apply to the full version. The names will change of course.
I spent a lot more time on this than I will ever save by being able to click through to the correct IDE, but darn it, I just hate to give up.
Here's the deal. Strangely, the associations seem to be keyed to the program file names. (Say, what?? That sure is the way it looks to me.) Both VC++ Express 2008 and 2010 are named VCExpress.exe. We'll give the 2008 version an alias. We'll also use a doppelganger to pull off something of a ruse.
Navigate to "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE". Make a copy of VCExpress.exe, (not a shortcut), and re-name it VCExpress-2008.exe. (It would probably do just to re-name the original and use the new name in step 3.)
Open regedit.exe. Create a new key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\VSExpress-2008.exe
Edit the (default) value in that key, to hold the string "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\VCExpress.exe" [sic]
Go through the drill with the file-association dialog again. Right-click, open with, choose default program, yada, yada, yada. Browse your way down to C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE and click on VSExpress-2008.exe.
VCExpress-2008 now shows up as a program in good standing, with its icon proudly displayed on the front page above the fold. (Don't tell the dialog, but you and I know it really points to VCExpress.exe, not the copy we made.) Click it.
Celebrate.
好吧,我终于找到了办法。您可以使用应用程序“默认程序编辑器”来打乱标准文件关联。
Ok i finally found a way. You can use the application "default programs editor" to mess with the standard file associations.