简体   繁体   中英

Visual Studio 2015 Ctrl + D (code duplication) not working (keyboard shortcut scheme issue with Resharper)

Ctrl + D in a Visual Studio 2015 Windows10 project is not working at all.. its working in Notepad++. I have tried to reboot my machine, and closed down Visual Studio but nothing works.

I have Windows 10 Threshold 2 and Visual Studio 2015 Version 14.0.23107.0

PS: it was working fine yesterday...

Edit1:

Keyboard mapping is looking good: 在此处输入图片说明

RESHARPER is/was the culprit

How to fix:

  • reset all Visual Studio settings ( Tools > Import and Export Settings > Reset all settings )
  • then go to the Resharper > Options > Keyboard & Menus and re-apply the keyboard shortcut scheme .

and now its working again!

重新安装 ReSharper 为我解决了这个问题

Just FYI, If you are VS 2019 User:

Extensions > Resharper > Options > Environment > Keyboard

Change Keyboard Scheme to None and save, then go back again and change it to Visual Studio

I was struggling with this problem for a while and this method fixed it.

Below steps are worked for me.

  1. Go to Tools > Options >Environment >General> Keyboard
  2. Select visual C# 2005 in keyboard mapping scheme
  3. In Show commands containing, search for Edit.Duplicate
  4. Assign Ctrl + D in shortcut key

转到文件->首选项->键盘快捷键-> 在顶部搜索重复-> 双击重复选择-> ctrl+Shift+D -> 按Enter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM