visual-studio Resharper Alt Enter 不起作用

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

Resharper Alt Enter not working

visual-studioresharper

提问by JontyMC

Help, I can't function without Resharper. All of a sudden my Alt+Enter ?shortcut (to bring up the action list) has stopped working. Anybody experienced this or know how to fix?

帮助,没有Resharper. 突然间,我的Alt+Enter ?快捷方式(用于调出操作列表)停止工作。任何人都经历过这个或知道如何解决?

回答by Josh Close

Symptom A: the menu pops up for a split second, then goes away. Fix using the following steps in numerical order.

现象A:菜单一瞬间弹出,然后消失。按数字顺序使用以下步骤进行修复。

Symptom B: pressing Alt+Enter ?does nothing. Fix using Step #2 firstthen try Step #1 if the issue persists.

症状 B:按Alt+Enter ?不起作用。如果问题仍然存在,请先使用步骤 #2 进行修复,然后尝试步骤 #1。

  1. Perform a Visual Studio reset:

    • Run cmd.exeas Administrator
    • cd C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\
    • devenv.exe /ResetSettings
  2. Re-apply Visual Studio keyboard scheme:

    • (VS2013 latest ReSharper)ReSharper > Options > Environment > Keyboard & Menus > ReSharper Platform keyboard scheme: Visual Studio > Apply Scheme > Save. This will reset the shortcut keys for ReSharper.
    • (older versions)ReSharper > Options > Environment > General > Visual Studio Integration > Apply
  1. 执行 Visual Studio 重置:

    • cmd.exe以管理员身份运行
    • cd C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\
    • devenv.exe /ResetSettings
  2. 重新应用 Visual Studio 键盘方案:

    • (VS2013 最新的 ReSharper)ReSharper > Options > Environment > Keyboard & Menus > ReSharper Platform keyboard scheme: Visual Studio > Apply Scheme > Save。这将重置 的快捷键ReSharper
    • (旧版本)ReSharper > Options > Environment > General > Visual Studio Integration > Apply

回答by Chuck Conway

You can try going ReSharper-> Options > IntelliSense > Generaland switching the radio buttons and clicking OK. Then switching back to the previously selected radiobutton.

您可以尝试转到ReSharper->Options > IntelliSense > General并切换单选按钮并单击OK。然后切换回之前选择的单选按钮。

Edit

编辑

Here is how to change/assign keyshort cuts in Visual Studio/Resharperfrom JetBrains Knowledge Base

以下是如何Visual Studio/ResharperJetBrains 知识库更改/分配快捷键

The command you are looking for is called "ReSharper_QuickFix". In version 8, this is called "Resharper_AltEnter".

您正在寻找的命令称为“ReSharper_QuickFix”。在版本 8 中,这称为“Resharper_AltEnter”。

回答by Bart

I had to do this:

我不得不这样做:

  1. Resharper -> Options -> Keyboard & Menus
  2. Select "ReSharper 2.x or IntelliJ IDEA"
  3. Click "Apply Scheme"
  4. Click "Save"

  5. Resharper -> Options -> Keyboard & Menus
  6. Select "Visual Studio"
  7. Click "Apply Scheme"
  8. Click "Save"
  1. Resharper -> 选项 -> 键盘和菜单
  2. 选择“ReSharper 2.x 或 IntelliJ IDEA”
  3. 点击“申请方案”
  4. 点击“保存”

  5. Resharper -> 选项 -> 键盘和菜单
  6. 选择“视觉工作室”
  7. 点击“申请方案”
  8. 点击“保存”

回答by wsbaser

To get your Alt+Enter ?combination working you should set "ReSharper_AltEnter" action (formerly "ReSharper_QuickFix(Text Editor)") for Alt+Enter ?in Tools->Options->Environment->Keyboard.Keyboard OptionsPress Alt+Enter ?in "Press shortcuts here:" field and expand "Shortcuts currently used by:" drop list. It is not necessary for action to be selected, it just should be there. If it is not - go to Resharper->Options->Environment->Keyboard & Menusand apply "ReSharper 2.x or Intellij IDEA" scheme.

为了让您的Alt+Enter ?组合工作,您应该为Alt+ Enter ?in设置“ReSharper_AltEnter”操作(以前称为“ReSharper_QuickFix(Text Editor)”)Tools->Options->Environment->Keyboard。在“在此处按快捷方式:”字段中键盘选项Alt+Enter ?并展开“当前使用的快捷方式:”下拉列表。没有必要选择动作,它只是应该在那里。如果不是 - 转到Resharper->Options->Environment->Keyboard & Menus并应用“ReSharper 2.x 或 Intellij IDEA”方案。

After that, ReSharper acions will work for Alt+Enter ?even when you'll apply "Visual Studio" or "None" keyboard scheme. To be exact, for "Visual Studio" schema selecting window will be shown and for "None" ReSharper action will be executed by default. Hereby, "ReSharper_AltEnter" for Alt+Enter ?is the key moment to get your ReSharper actions working!

之后,即使您将应用“Visual Studio”或“None”键盘方案,ReSharper 动作也适用于Alt+ Enter ?。确切地说,对于“Visual Studio”架构选择窗口将被显示,对于“无”ReSharper 操作将默认执行。因此,Alt+ 的“ReSharper_AltEnter”Enter ?是让您的 ReSharper 操作正常工作的关键时刻!

回答by Kwex

Thanks Josh ... your suggestion worked for me. The steps I took on VS 2010were:

谢谢乔希……你的建议对我有用。我采取的步骤VS 2010是:

ReSharper -> Options -> Environment -> Visual Studio Integration -> Keyboard Shortcuts (Visual Studio) -> Apply Scheme (button)

ReSharper -> 选项 -> 环境 -> Visual Studio 集成 -> 键盘快捷键 (Visual Studio) -> 应用方案(按钮)

回答by Mateusz Miga?a

I had to do this:

我不得不这样做:

  1. Go to Visual Studio -> Tools -> Options -> Environment -> Keyboard

  2. Press Reset

  3. Go to ReSharper -> Options... -> Environment -> Keyboard & Menus

  4. Select the ReSharper keyboard scheme

  5. Finally, select Visual Studio, click on Apply Schemeand then Save

  1. 转到Visual Studio -> 工具 -> 选项 -> 环境 -> 键盘

  2. 重置

  3. 转到ReSharper -> 选项... -> 环境 -> 键盘和菜单

  4. 选择ReSharper 键盘方案

  5. 最后,选择Visual Studio,点击Apply Scheme然后点击Save

.. and it worked!

..它奏效了!

回答by Will Yu

I have encounter the same problem. you might be able to fix it by going into the

我遇到了同样的问题。你可以通过进入

ReSharper > Options > Environment > Keyboard & Menus > check ReSharper 2.x or IntelliJ IDEA -> Apply

ReSharper > 选项 > 环境 > 键盘和菜单 > 检查 ReSharper 2.x 或 IntelliJ IDEA -> 应用

This will reset the shortcut keys for ReSharper.

这将重置 的快捷键ReSharper

回答by Anas Alweish

In addition to the answers above, there is an easy way Using Resharper 3.3

除了上面的答案,还有一个简单的方法 Using Resharper 3.3

in Visual Studio 2017

在 Visual Studio 2017 中

  • Open Tools> Optionsor press Alt+ T+ O
  • Under Environmenttab > Keyboard
  • Search for "AltEnter" and select Resharper_AltEnter
  • Add a new shortcut Alt+Enter
  • Assign> OK
  • 打开 工具>选项或按Alt+ T+O
  • 环境选项卡下 >键盘
  • 搜索“ AltEnter”并选择Resharper_AltEnter
  • 添加新的快捷方式 Alt+Enter
  • 分配>确定

and it worked...

它起作用了……

enter image description here

在此处输入图片说明

回答by Mark Smith

As an additional reason for why Alt+Enter ?would not work if analysis is turned offon the file. If you look in the upper right of the of the code editing window just to the right of the scroll bar and there is a pauseicon instead of the warning, or OKsymbols R#will not give you any menu on Alt+Enter ?.

如果打开文件分析,Alt+Enter ?将不起作用的另一个原因。如果您查看滚动条右侧的代码编辑窗口的右上角,并且有一个图标而不是, 或者符号不会为您提供任何+菜单。offpausewarningOKR#AltEnter ?

If this is disabled you can enable it from the R#options menu under Code Inspection > Settingsand make sure that Enable code analysisis checked.

如果这被禁用,您可以从R#选项菜单中启用它Code Inspection > Settings并确保Enable code analysis选中。

回答by Donny

The only thing to be done is to set the keyboard shortcut under Options > Environment > Keyboard. You add ReSharper_QuickFixto your search and enter the shortcut keys under Press shortcut keys:textbox and click Assignand OK. Done, You don't have to reset anything.

唯一要做的就是在Options > Environment > Keyboard. 您添加ReSharper_QuickFix到您的搜索并在Press shortcut keys:文本框下输入快捷键,然后单击AssignOK。完成,您无需重置任何内容。