C# 安装了 Resharper 的 Visual Studio 中的键盘快捷键未激活

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16364059/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-10 00:51:51  来源:igfitidea点击:

Keyboard shortcuts are not active in Visual Studio with Resharper installed

c#visual-studioresharper

提问by Julia

I have Visual Studio 2012+ Resharper7.1.1000.900 + StyleCop 4.7.44 installed.

我安装了Visual Studio 2012+ Resharper7.1.1000.900 + StyleCop 4.7.44。

The problem is that no shortcutsare active since Resharper was installed.

问题是自从安装了 Resharper 以来,没有任何快捷方式处于活动状态。

For example: I can rename via 'Refactor > Rename'. But shorcut Ctrl+Rdoes nothing.

例如:我可以通过“重构 > 重命名”来重命名。但是 shorcut Ctrl+R什么也不做。

I've set Resharper keyboard schemeto 'Visual Studio' in 'Resharper > Options > Environment > Keyboard & Menus'

我已在“Resharper > 选项 > 环境 > 键盘和菜单”中将Resharper 键盘方案设置为“Visual Studio”

Is there any way to activate shortcuts? Thanks.

有没有办法激活快捷方式?谢谢。

采纳答案by Nick Spreitzer

I would first try resetting all Visual Studio settings (Tools > Import and Export Settings > Reset all settings), then go to the Resharper > Options > Keyboard & Menusand re-apply the keyboard shortcut scheme.

我会首先尝试重置所有 Visual Studio 设置(工具 > 导入和导出设置 > 重置所有设置),然后转到Resharper > 选项 > 键盘和菜单并重新应用键盘快捷键方案。

I had to do something similar once.

我不得不做一次类似的事情。

回答by Anthony Russell

The only thing I could find said first try and do a VS-Repair. If that doesn't work then do this.

我唯一能找到的就是首先尝试进行 VS-Repair。如果这不起作用,请执行此操作。

Restart Windows and in safe mode, run devenv /safemode in Visual Studio 2005 Command Prompt. If in safe mode this issue disappeared, the cause should be third-party applications, services or Visual Studio Add-ins. Please also try devenv /resetsettings or devenv /setup in Command Prompt.

http://support.microsoft.com/kb/907965

重新启动 Windows 并在安全模式下,在 Visual Studio 2005 命令提示符中运行 devenv /safemode。如果在安全模式下此问题消失,原因应该是第三方应用程序、服务或 Visual Studio 加载项。还请在命令提示符中尝试 devenv /resetsettings 或 devenv /setup。

http://support.microsoft.com/kb/907965

http://forums.asp.net/t/1103223.aspx/1

http://forums.asp.net/t/1103223.aspx/1

回答by John Laffoon

You can look at the Visual Studio Integration options for ReSharper by...

您可以通过以下方式查看 ReSharper 的 Visual Studio 集成选项...

  1. Select ReSharper > Options...from the Visual Studio menu
  2. Select the Visual Studio Integrationitem on the Options window
  1. 从 Visual Studio 菜单中选择ReSharper > 选项...
  2. 在选项窗口中选择Visual Studio 集成

The bottom of the page gives instructions on how to reset the keyboard scheme.

页面底部给出了如何重置键盘方案的说明。

If that doesn't work, I would re-install ReSharper.

如果这不起作用,我会重新安装 ReSharper。

回答by ND72

This worked for me.

这对我有用。

Setting to Resharper / Options / KeyBoard & Menus / None/ Apply and Save

设置为 Resharper / 选项 / 键盘和菜单 // 应用并保存

and then

进而

Resharper / Options / KeyBoard & Menus / Set to Visual Studio/ Apply and Save

Resharper / 选项 / 键盘和菜单 /设置为 Visual Studio/ 应用并保存

回答by Yuri Fedoseev

I had the same problem and reset didn't fix it. Then the resharper support helped me. Solution was very simple! I'm from Russia and usually my default keyboard is Russian. In control panel | language settings | change keyboard - I changed default keyboard to English. Then reapply settings in VS: Resharper|Options|Keyboard&Menus - apply R# scheme. And the problem was fixed :)

我有同样的问题,重置没有解决它。然后 resharper 的支持帮助了我。解决方法很简单!我来自俄罗斯,通常我的默认键盘是俄语。在控制面板 | 语言设置 | 更改键盘 - 我将默认键盘更改为英语。然后在 VS 中重新应用设置:Resharper|Options|Keyboard&Menus - 应用 R# 方案。问题得到了解决:)

回答by rjso

Just a comment on this issue. After I installed Visual Studio 2015 RTM all my resharper shortcuts were gone. (I had them working just fine with RC) A few of my colleagues were having the exact same issue with Visual Studio 2012.

只是对这个问题发表评论。安装 Visual Studio 2015 RTM 后,我所有的 resharper 快捷方式都消失了。(我让他们在 RC 上工作得很好)我的一些同事在使用 Visual Studio 2012 时遇到了完全相同的问题。

I tried all the suggestions in here but none worked. The way I found to solve this was to: go to Tools -> Import and Export Settings , select the "Import selected environment settings" and in my case use the Settings I had from my RC installation (you can see that there are files with parts of a date as the filename like: CurrentSettings-2014-09-22). For my colleagues problem I basically sent them my .vssettings that I had that was working on my local VS2012 installation.

我尝试了这里的所有建议,但都没有奏效。我发现解决这个问题的方法是:转到 Tools -> Import and Export Settings ,选择“Import selected environment settings”,在我的情况下使用我从 RC 安装中获得的设置(你可以看到有文件日期的一部分作为文件名,如:CurrentSettings-2014-09-22)。对于我的同事问题,我基本上向他们发送了我在本地 VS2012 安装中使用的 .vssettings。

This effectively solved the shortcut problem. Further investigation in my case showed that although I applied the Resharper shortcuts they were never bound to the actual shortcut key thats why resetting stuff never worked.

这有效地解决了快捷方式问题。在我的案例中的进一步调查表明,虽然我应用了 Resharper 快捷方式,但它们从未绑定到实际的快捷键,这就是为什么重置东西从未奏效的原因。

回答by Adam Skinner

I had a very difficult time getting this working one under VS2015 one day. After the initial install everything was working, but I come in this morning and my keyboard shortcuts don't work. Going through Resharper's Environment > Keyboard & Menusdidn't work; reinstalling Resharper didn't work. Even deleting every configuration from Resharper's AppData folder didn't work.

有一天,我很难在 VS2015 下运行这个。初始安装后一切正常,但我今天早上来了,我的键盘快捷键不起作用。通过 Resharper 的环境 > 键盘和菜单不起作用;重新安装 Resharper 不起作用。即使从 Resharper 的 AppData 文件夹中删除每个配置也不起作用。

So what did work? Going to Visual Studio's Tools > Options > Environment > Keyboardand clicking Reset. After I did that, then Resharper's schemes would take.

那么有什么作用呢?转到 Visual Studio 的Tools > Options > Environment > Keyboard并单击Reset。在我这样做之后,Resharper 的计划就会生效。

回答by JimiSweden

I had the same problem with Visual Studio 2015 and Resharper 9.2

我在 Visual Studio 2015 和 Resharper 9.2 上遇到了同样的问题

"Resharper 9 keyboard shortcuts not working in Visual Studio 2015"

“Resharper 9 键盘快捷键在 Visual Studio 2015 中不起作用”

I had tried all possible resetting and applying keyboard schemes and found the answer from Yuri Fedoseev.

我尝试了所有可能的重置和应用键盘方案,并从 Yuri Fedoseev 那里找到了答案。

My Windows 10 language configuration only had Swedish in the language preferences "Control Panel\Clock, Language, and Region\Language"

我的 Windows 10 语言配置在语言首选项“控制面板\时钟、语言和区域\语言”中只有瑞典语

The solutionwas to add English(I chose the US version) in the language list. And then go to Resharper > Options > Keyboard & Menus > Apply Scheme. (perhaps you do not even need to apply the scheme)

解决方案是在语言列表中添加英语(我选择了美国版本)。然后转到 Resharper > 选项 > 键盘和菜单 > 应用方案。(也许您甚至不需要应用该方案)

回答by InquisitorJax

Alternatively - make sure that Resharper is enabled. My visual studio didn't update my Resharper license information, so when opening the resharper menu (after trying to figure out why my shortcuts stopped working!), the was a menu item "Why is Resharper disabled?" Clicking on the menu item opens up a dialog, which then automatically resolved the license. The next question for Jetbrains is why do I have to open the dialog for the thing to automatically renew??

或者 - 确保启用了 Resharper。我的 Visual Studio 没有更新我的 Resharper 许可证信息,所以当打开 resharper 菜单时(在试图找出我的快捷方式停止工作的原因之后!),是一个菜单项“为什么 Resharper 被禁用?” 单击菜单项会打开一个对话框,然后自动解析许可证。Jetbrains 的下一个问题是为什么我必须打开对话框才能让事物自动更新?

回答by Lawrence

This one worked for me

这个对我有用

RESHARPER > OPTIONS > select visual studio (Under Keyboard Shortcuts)

RESHARPER > OPTIONS > select visual studio (Under Keyboard Shortcuts)

VS + Resharper

VS + Resharper