I still have F7 as my global View code key, but it doesn't work.
My F7 key on keyboard is not broken (because I can use F7 in other app)
How can I detect what happened with my F7 key in Visual Studio?

I still have F7 as Global View code

  • Accordingly to developercommunity.visualstudio.com the upcoming release (15.7.4.) should fix that.
    – Pedro77
    Jun 15, 2018 at 19:18

4 Answers 4


The Web Tools team added a new command in 15.7 that supports switching between a Razor View and its C# code file, and mapped it to F7 because that's a common mapping for similar commands. However, we didn't realize that this overlaps with the build command in certain keyboard schemes and needs to be removed from those schemes.

We are working on a fix that we will push out very soon. In the meantime, you can unblock yourself with the following workaround.

  • Go to Tools->Options->Environment->Keyboard
  • In "Show commands containing" type "ToggleRazorView"
  • Select "EditorContextMenus.CodeWindow.ToggleRazorView"
  • Next to "Shortcuts for selected command" click "Remove"

Answer by Vino Wang from Visual Studio Developer Community


Thank you for your feedback! We have fixed the problem in an upcoming release (15.7.4.) Thank you for helping us build a better Visual Studio!

Finaly! :D


Build.Solution is also assigned to F7. In my case, that's the shortcut that does not work.

Generally, in case of shortcut issue, find the command you that the shortcut does not work for you, click "Remove" shortcut, then reassign again the same shortcut. VS will show in "Shortcut currently used by" command that uses the same shortcut and causes conflict.


You need to remove the F7 shortcut that is attached to:


  • thanks for comment, After some tries, I've update some more setting then F7 work again, imgur.com/a/s1dLq5A
    – Luke
    May 30, 2018 at 3:37

After some tries, I've added F7 to anything related to "ViewCode" option, than it works again,

enter image description here

  • For who minus this, what did you expected for?
    – Luke
    Jun 18, 2018 at 3:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .