Windows中的Visual Studio文件关联 [英] Visual Studio files association in Windows

查看:507
本文介绍了Windows中的Visual Studio文件关联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows资源管理器中,当我双击任何Visual Studio文件(*.cs*.csproj等)时,它将打开旧版本的VS,而不是最新版本的VS(VS 2017). VS的文件类型过多.

In Windows Explorer when I double-click on any Visual Studio file (*.cs, *.csproj, etc.), it's opening an old version of VS instead of the latest one (VS 2017). And VS has associations with too many file types.

如何更改默认 Visual Studio (针对VS可以处理的所有文件)?

How can I change the default Visual Studio (for all those files that VS can handle)?

还有一个关于Visual Studio 2008的类似旧问题(将文件关联从Visual Studio 2005迁移到2008 ),但是那里的解决方案不再起作用(在Visual Studio 2017的设置上没有恢复文件关联"按钮).

There is a similar old question about Visual Studio 2008 (Move file associations from Visual Studio 2005 to 2008) but the solution in there doesn't work anymore (there is no "Restore File Associations" button on the settings of Visual Studio 2017).

推荐答案

还有一长串以前可以正常工作的列表,微软已经将它们完全管理了#$ @%@.如果我尝试以默认方式更改默认值,则会得到以下信息:

Yet another in a long list of previously working-just-fine things which Microsoft have managed totally #$@%@ up. If I try to change defaults the 'right' way I get this kind of thing:

即完全忽略了.我设法解决此问题的唯一方法是完全通过注册表删除文件关联.让我们以.asm为例:

i.e. completely ignored. The only way I've managed to solve it is by removing the file association entirely through the registry. Let's take .asm as an example:

  1. 打开注册表编辑器/"regedit.exe"
  2. 导航到HKEY_CLASSES_ROOT\.asm\OpenWithProgIds
  3. 删除您看到的所有Visual Studio值
  1. Open Registry Editor / "regedit.exe"
  2. Navigate to HKEY_CLASSES_ROOT\.asm\OpenWithProgIds
  3. Delete any Visual Studio values you see

从那里,您可以(最终)使用您选择的任何内容打开文件,而不必将关联限制在Visual Studio中:

From there, you can (finally) open files with whatever you choose instead of having the association clamped to Visual Studio:

出于记录,我认为这是Windows 10的问题,而不是Visual Studio的问题.请参阅:

For the record, I believe this to be a problem with Windows 10. Not with Visual Studio. See: https://answers.microsoft.com/en-us/windows/forum/windows_10-files/cant-change-default-programs-in-windows-10/229fc3a9-25c9-433b-a333-5806bc5090db

这篇关于Windows中的Visual Studio文件关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆