Search code examples
c#visual-studiovisual-studio-2017

Visual Studio 2017 Enterprise - Move Selected Lines Up / Down shortcut not working


For some users, including me, it seems that in Visual Studio 2017 (maybe only the Enterprise version) the shortcut Alt + / does not work.

If you go to Edit -> Advanced -> Move Selected Lines Up / Down you can see if the shortcut is there or not.

enter image description here

If I go to Tools -> Options... -> Environment -> Keyboard -> Edit.MoveSelectedLinesUp / Edit.MoveSelectedLinesDown and assign Alt + / everything looks good from the edit view. However when I use the shortcut Visual Studio jumps between classes and methods in the file instead of moving the line. If I click on Move Selected Lines Up / Down from the menu the functionality works as expected. Why is this?

enter image description here

https://developercommunity.visualstudio.com/content/problem/50611/move-line-updown-shortcut-doesnt-work.html


Solution

  • As commented by @Crowcoder ReSharper seems to be the culprit. Using the command Ctrl + Shift + Alt + / works. However suspending ReSharper via Tools -> Options... -> ReSharper Ultimate -> Suspend the normal command will still not work, even after restarting VS with the feature suspended. It seems ReSharper has to be uninstalled for this functionality to work again.

    enter image description here