F12不再适用于Visual Studio

时间:2021-04-24 16:57:41

This is driving me crazy. Ever since I installed ReSharper 4, F12 no longer seems to work. If you look at the all the ReSharper short cuts in the Goto sub menu Declaration doesn't have any assigned!

这真让我抓狂。自从我安装了ReSharper 4后,F12似乎不再起作用了。如果您查看Goto子菜单中的所有ReSharper快捷方式声明没有任何指定!

The only way I can go to declaration is by using Alt and ` and then selecting Declaration.

我可以进行声明的唯一方法是使用Alt和`然后选择声明。

I have tried un-installing and re-installing ReSharper with no luck, I have also, in ReSharper option asked it to use the default Visual Studio Key Bindings but that doesn't to work either.

我已经尝试过卸载并重新安装ReSharper而没有运气,我也在ReSharper选项中要求它使用默认的Visual Studio Key Bindings,但这也不起作用。

Interestingly, when I do use Alt and ` I actually get two entries for the Declaration option.

有趣的是,当我使用Alt和`我实际上获得了声明选项的两个条目。

Has anyone come across this problem?

有人遇到过这个问题吗?

I am using Visual Studio 2005 SP1.

我正在使用Visual Studio 2005 SP1。

10 个解决方案

#1


I have had a few occasions where Resharper and Visual Studio keybindings got mixed up and I had problems sorting them out.

我曾经有过几次Resharper和Visual Studio键绑定混淆的问题,我在排序时遇到了问题。

If it is only one or two bindings you care about then you can change them by going to the

如果它只是你关心的一两个绑定,那么你可以通过转到它来改变它们

Tools->Customize->Keyboard menu option.

工具 - >自定义 - >键盘菜单选项。

#2


I ran into the same issue and resolved it by first resetting my Visual Studio keyboard mappings:

我遇到了同样的问题并通过首先重置我的Visual Studio键盘映射来解决它:

Tools > Options > Keyboard > Reset

工具>选项>键盘>重置

Then going into the ReSharper options and applying the scheme:

然后进入ReSharper选项并应用该方案:

Resharper > Options > Visual Studio Integration > Apply Scheme

Resharper>选项> Visual Studio集成>应用方案

Update:

For VS2017:

Tools > Options > Environment > Keyboard > Reset

工具>选项>环境>键盘>重置

For Resharper 2017.2:

对于Resharper 2017.2:

Resharper > Options > Environment > Keyboard & Menus > Keyboard Shortcuts > Apply Scheme

Resharper>选项>环境>键盘和菜单>键盘快捷键>应用方案

#3


For ReSharper 8 and Visual Studio 2012:

对于ReSharper 8和Visual Studio 2012:

Tools > Options > Keyboard > Reset

工具>选项>键盘>重置

Then going into the ReSharper options and applying the scheme:

然后进入ReSharper选项并应用该方案:

Resharper > Options > Environment > Keyboard & Menus > (Select Visual Studio under Keyboard Shortcuts) > Apply Scheme > Save

Resharper>选项>环境>键盘和菜单>(在键盘快捷键下选择Visual Studio)>应用方案>保存

#4


I had this issue in VS2015 using Resharper 9.1.3, I tried Ryan's answer but it still didn't work.

我使用Resharper 9.1.3在VS2015中遇到了这个问题,我尝试了Ryan的答案,但它仍然没有用。

  • After doing the steps Ryan outlined, I clicked F12 where Resharper asks What do you want to do?, I select Use Visual Studio commands. Still doesn't work.
  • 在完成Ryan概述的步骤之后,我点击了F12,其中Resharper问你想做什么?,我选择了使用Visual Studio命令。仍然无法正常工作。

  • Tools > Options > Keyboard > Select ReSharper.ReSharper_GotoNextHighlight from command list box
  • 工具>选项>键盘>从命令列表框中选择ReSharper.ReSharper_GotoNextHighlight

  • Change Shortcuts for selected command to F12 (Text Editor), click Remove and OK.
  • 将所选命令的快捷方式更改为F12(文本编辑器),单击“删除”和“确定”。

After this it works!

在此之后它有效!

#5


I had this problem and it was resolved by following the steps described in the picture:

我遇到了这个问题,按照图片中描述的步骤解决了这个问题:

Open Visual Studio Tabs on the path: Tools>>Options>>Keyboard

在路径上打开Visual Studio选项卡:工具>>选项>>键盘

F12不再适用于Visual Studio

Open Visual Studio Tabs on the path: Resharper>>Options>>Keyboard & Menus and Do the following:

在路径上打开Visual Studio选项卡:Resharper >>选项>>键盘和菜单并执行以下操作:

F12不再适用于Visual Studio

And Then Reopen the path above and do the following:

然后重新打开上面的路径并执行以下操作:

F12不再适用于Visual Studio

Finally, close the Visual Studio and open it.

最后,关闭Visual Studio并打开它。

#6


I had the same problem with VS2013 and Resharper 9. I have a code like this:

我和VS2013和Resharper 9有同样的问题。我有这样的代码:

gridList.Method1();
gridList.Method2();

I then right-click on any of gridList and click Find Usages (or just use Shift+F12) but it says "Usages not found" even though it is just one line away! Sometimes VS restart would help, sometimes it wouldn't. It looks like clearing the cache of Reshaper helps though: Resharper -> Options -> Environment -> General -> Clear Caches. This needs VS to be restarted, but then it started working as expected.

然后我右键单击gridList中的任何一个并单击Find Usages(或者只使用Shift + F12),但它显示“Usages not found”,即使它只是一行之外!有时VS重启会有所帮助,有时则不会。看起来清除Reshaper的缓存有助于:Resharper - > Options - > Environment - > General - > Clear Caches。这需要重新启动VS,但随后它开始按预期工作。

#7


It is possible that you have enabled Fn mode (Blue Keys) on your keyboard which overrides default behavior of functional keys including F12.

您可能已启用键盘上的Fn模式(蓝键),该模式会覆盖功能键(包括F12)的默认行为。

#8


I ran into this problem after an organizational change that caused my windows profile to change. I tried the solutions listed above, but nothing seemed to work. Here is how I fixed it (brute force worked!)

在组织更改导致我的Windows配置文件更改后,我遇到了这个问题。我尝试了上面列出的解决方案,但似乎没有任何效果。这是我如何修复它(蛮力工作!)

NOTE: Steps listed are for VS 2012 and ReSharper 7.1.3

注意:列出的步骤适用于VS 2012和ReSharper 7.1.3

  1. Uninstalled Re-Sharper
  2. Exit visual studio, ensure the process devenv.exe is no longer there in the running processes (was there in my case and I had to do a "End Process Tree" from Task Manager)
  3. 退出visual studio,确保进程中的devenv.exe不再存在(在我的情况下,我必须从任务管理器执行“结束进程树”)

  4. Fired up VS 2012, and from the menu Tools -> Options -> Environment -> Keyboard selected Visual C# 2005 (or any other setting you love) and pressed Reset
  5. 解雇VS 2012,并从菜单工具 - >选项 - >环境 - >键盘选择Visual C#2005(或任何其他你喜欢的设置)并按下重置

  6. Shutdown VS again (and ensure devenv.exe has been killed in Task manager)
  7. 再次关闭VS(并确保在任务管理器中杀死了devenv.exe)

  8. Re-installed re-sharper

Best of luck!

祝你好运!

#9


These steps solved it for me:

这些步骤为我解决了这个问题:

  1. Uninstall keyboard in Device Manager
  2. 在设备管理器中卸载键盘

  3. Re-insert your keyboard usb
  4. 重新插入键盘USB

#10


"Web Essentials" Add or update visual studio "Web Essentials" You can find it at: Menu>>Tools>>Extensions and Updates

“Web Essentials”添加或更新visual studio“Web Essentials”您可以在以下位置找到它:菜单>>工具>>扩展和更新

I hope this will save your time. It worked for me.

我希望这会节省你的时间。它对我有用。

F12不再适用于Visual Studio

#1


I have had a few occasions where Resharper and Visual Studio keybindings got mixed up and I had problems sorting them out.

我曾经有过几次Resharper和Visual Studio键绑定混淆的问题,我在排序时遇到了问题。

If it is only one or two bindings you care about then you can change them by going to the

如果它只是你关心的一两个绑定,那么你可以通过转到它来改变它们

Tools->Customize->Keyboard menu option.

工具 - >自定义 - >键盘菜单选项。

#2


I ran into the same issue and resolved it by first resetting my Visual Studio keyboard mappings:

我遇到了同样的问题并通过首先重置我的Visual Studio键盘映射来解决它:

Tools > Options > Keyboard > Reset

工具>选项>键盘>重置

Then going into the ReSharper options and applying the scheme:

然后进入ReSharper选项并应用该方案:

Resharper > Options > Visual Studio Integration > Apply Scheme

Resharper>选项> Visual Studio集成>应用方案

Update:

For VS2017:

Tools > Options > Environment > Keyboard > Reset

工具>选项>环境>键盘>重置

For Resharper 2017.2:

对于Resharper 2017.2:

Resharper > Options > Environment > Keyboard & Menus > Keyboard Shortcuts > Apply Scheme

Resharper>选项>环境>键盘和菜单>键盘快捷键>应用方案

#3


For ReSharper 8 and Visual Studio 2012:

对于ReSharper 8和Visual Studio 2012:

Tools > Options > Keyboard > Reset

工具>选项>键盘>重置

Then going into the ReSharper options and applying the scheme:

然后进入ReSharper选项并应用该方案:

Resharper > Options > Environment > Keyboard & Menus > (Select Visual Studio under Keyboard Shortcuts) > Apply Scheme > Save

Resharper>选项>环境>键盘和菜单>(在键盘快捷键下选择Visual Studio)>应用方案>保存

#4


I had this issue in VS2015 using Resharper 9.1.3, I tried Ryan's answer but it still didn't work.

我使用Resharper 9.1.3在VS2015中遇到了这个问题,我尝试了Ryan的答案,但它仍然没有用。

  • After doing the steps Ryan outlined, I clicked F12 where Resharper asks What do you want to do?, I select Use Visual Studio commands. Still doesn't work.
  • 在完成Ryan概述的步骤之后,我点击了F12,其中Resharper问你想做什么?,我选择了使用Visual Studio命令。仍然无法正常工作。

  • Tools > Options > Keyboard > Select ReSharper.ReSharper_GotoNextHighlight from command list box
  • 工具>选项>键盘>从命令列表框中选择ReSharper.ReSharper_GotoNextHighlight

  • Change Shortcuts for selected command to F12 (Text Editor), click Remove and OK.
  • 将所选命令的快捷方式更改为F12(文本编辑器),单击“删除”和“确定”。

After this it works!

在此之后它有效!

#5


I had this problem and it was resolved by following the steps described in the picture:

我遇到了这个问题,按照图片中描述的步骤解决了这个问题:

Open Visual Studio Tabs on the path: Tools>>Options>>Keyboard

在路径上打开Visual Studio选项卡:工具>>选项>>键盘

F12不再适用于Visual Studio

Open Visual Studio Tabs on the path: Resharper>>Options>>Keyboard & Menus and Do the following:

在路径上打开Visual Studio选项卡:Resharper >>选项>>键盘和菜单并执行以下操作:

F12不再适用于Visual Studio

And Then Reopen the path above and do the following:

然后重新打开上面的路径并执行以下操作:

F12不再适用于Visual Studio

Finally, close the Visual Studio and open it.

最后,关闭Visual Studio并打开它。

#6


I had the same problem with VS2013 and Resharper 9. I have a code like this:

我和VS2013和Resharper 9有同样的问题。我有这样的代码:

gridList.Method1();
gridList.Method2();

I then right-click on any of gridList and click Find Usages (or just use Shift+F12) but it says "Usages not found" even though it is just one line away! Sometimes VS restart would help, sometimes it wouldn't. It looks like clearing the cache of Reshaper helps though: Resharper -> Options -> Environment -> General -> Clear Caches. This needs VS to be restarted, but then it started working as expected.

然后我右键单击gridList中的任何一个并单击Find Usages(或者只使用Shift + F12),但它显示“Usages not found”,即使它只是一行之外!有时VS重启会有所帮助,有时则不会。看起来清除Reshaper的缓存有助于:Resharper - > Options - > Environment - > General - > Clear Caches。这需要重新启动VS,但随后它开始按预期工作。

#7


It is possible that you have enabled Fn mode (Blue Keys) on your keyboard which overrides default behavior of functional keys including F12.

您可能已启用键盘上的Fn模式(蓝键),该模式会覆盖功能键(包括F12)的默认行为。

#8


I ran into this problem after an organizational change that caused my windows profile to change. I tried the solutions listed above, but nothing seemed to work. Here is how I fixed it (brute force worked!)

在组织更改导致我的Windows配置文件更改后,我遇到了这个问题。我尝试了上面列出的解决方案,但似乎没有任何效果。这是我如何修复它(蛮力工作!)

NOTE: Steps listed are for VS 2012 and ReSharper 7.1.3

注意:列出的步骤适用于VS 2012和ReSharper 7.1.3

  1. Uninstalled Re-Sharper
  2. Exit visual studio, ensure the process devenv.exe is no longer there in the running processes (was there in my case and I had to do a "End Process Tree" from Task Manager)
  3. 退出visual studio,确保进程中的devenv.exe不再存在(在我的情况下,我必须从任务管理器执行“结束进程树”)

  4. Fired up VS 2012, and from the menu Tools -> Options -> Environment -> Keyboard selected Visual C# 2005 (or any other setting you love) and pressed Reset
  5. 解雇VS 2012,并从菜单工具 - >选项 - >环境 - >键盘选择Visual C#2005(或任何其他你喜欢的设置)并按下重置

  6. Shutdown VS again (and ensure devenv.exe has been killed in Task manager)
  7. 再次关闭VS(并确保在任务管理器中杀死了devenv.exe)

  8. Re-installed re-sharper

Best of luck!

祝你好运!

#9


These steps solved it for me:

这些步骤为我解决了这个问题:

  1. Uninstall keyboard in Device Manager
  2. 在设备管理器中卸载键盘

  3. Re-insert your keyboard usb
  4. 重新插入键盘USB

#10


"Web Essentials" Add or update visual studio "Web Essentials" You can find it at: Menu>>Tools>>Extensions and Updates

“Web Essentials”添加或更新visual studio“Web Essentials”您可以在以下位置找到它:菜单>>工具>>扩展和更新

I hope this will save your time. It worked for me.

我希望这会节省你的时间。它对我有用。

F12不再适用于Visual Studio