Visual Studio hot keys change occasionally, specifically F6 vs Ctrl-Shift-B for building. WHY?

C#Visual Studio-2008

C# Problem Overview


I always press F6 to build my project. Suddenly some of my Visual Studio instances are wanting me to use Ctrl-Shift-B. It's not keyboard related - the actual text of the menu option changes from "F6" to "Ctrl-Shift-B".

Any answers as to how to fix, and what causes this?

C# Solutions


Solution 1 - C#

Keyboard mapping corruption issue perhaps? Check Tools / Options, Environment / Keyboard. Should see a drop-down for your Keyboard mapping scheme and next to it a Reset button. Hit the reset button.

I'm not responsible for this screwing with your settings - save them prior to doing this just in case you screw the pooch.

Oh, in case the narcs out there care, I think this is a valid question and would be put out if someone voted to close it. Of course now that I've said that, its a certaintity, isn't it?

Solution 2 - C#

Your keyboard scheme has changed - go to Tools/Options/Environment/Keyboard and set the default keyboard scheme to 'Visual C# 2005'

Solution 3 - C#

This is because you might have selected "General Development Settings" as your default environment settings for your Visual Studio (which usually we do on the first launch of VS after installing it as it pops up a dialogue box to choose default environment settings).

If you only want to change the keyboard hotkeys settings, you just follow the solution proposed by others (Tools > Options > Environment > Keyboard > Visual C# 2015). BUT this will only change the keyboard settings to C# settings while keeping rest of the settings as General settings only.

If you are really intending to change complete environment to C# settings, then follow this approach.

SOLUTION 1:

  1. Go to "Tools" (menu)
  2. "Import and Export Settings"
  3. "Import selected environment settings"
  4. Either select "Yes, save my current settings" or "No, just import new settings, overwriting my current settings"
  5. "Which collection of settings do you want to import?"
  6. Under "Default Settings" tree select "Visual C#" node (you might see a yellow warning sign, NO need to worry about it) and then click "Finish" button.

or you can do the same like

SOLUTION 2:

  1. Go to "Tools" (menu)
  2. "Import and Export Settings"
  3. "Reset all settings"
  4. Either select "Yes, save my current settings" or "No, just import new settings, overwriting my current settings"
  5. Select "Visual C#" from the list and then click "Finish" button.

Both approaches would give you the same result of changing your complete environment to 'Visual C#" there onward.

Enjoy Coding :)

Solution 4 - C#

If you have other key bindings and dont want to reset the lot use: Tools -> Options -> Environment -> Keyboard

Then find Build.BuildSolution or Build.RebuildSolution (on your preference) select Global in the Use shortcut in dropdown, place the cursor in Press Shortcut Key and slap F6. It'll show you what it is currently assigned to, for me is was to traverse split panes (maybe it overrides F6 when you use split panes for the first time? I've always wondered why my home development machine built with F6 and my work one doesn't and come to think of it I've never used split panes at home) then hit Assign.

Solution 5 - C#

Its because you installed VMWare. It remaps that key so that F6 can be used to start debugging on a virtual machine.

Annoyed me too.

Solution 6 - C#

You can reassign SHIFT + F6 to build the current project only:

1/ Go to Tools -> Options -> Environment -> Keyboard

2/ Show commands containing: Build.BuildSelection

3/ Focus the field Press shortcut keys & press Shift + F6 to assign it

Solution 7 - C#

Notepad++'s NPPscripting plugin broke Ctrl-Shift-B for my whole OS while NP++ was running. Uninstalling the plugin (I had to delete the DLL manually from the Notepad++ plugins folder) fixed the broken key mapping for me.

Solution 8 - C#

I had TPFanControl installed which captured Ctrl+Shift+B globally. I used a tool mentioned in this answere to find out which program registered for which shortcuts.

Solution 9 - C#

I had a stale build in my solution (included libraries were apparently using old DLL versions and I was getting MissingMethodException's at runtime) so I deleted all the \bin directories in my C# projects, restarted Visual Studio, and suddenly this issue is now affecting me for the first time in the 3+ years since I started using Visual Studio.

No clue how this could have affected my user settings, but it apparently did. They went from using the "Visual C# 2005" keyboard profile to "default"

Solution 10 - C#

Tools -> Options -> Environment -> Keyboard

search this command: "ClassViewContextMenus.ClassViewProjectBuild"

Assign F6

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTheSoftwareJediView Question on Stackoverflow
Solution 1 - C#ScottCherView Answer on Stackoverflow
Solution 2 - C#stuartdView Answer on Stackoverflow
Solution 3 - C#CYBERNARESHView Answer on Stackoverflow
Solution 4 - C#Chris HardenView Answer on Stackoverflow
Solution 5 - C#Nick WhaleyView Answer on Stackoverflow
Solution 6 - C#domenuView Answer on Stackoverflow
Solution 7 - C#CAD blokeView Answer on Stackoverflow
Solution 8 - C#0xBADF00DView Answer on Stackoverflow
Solution 9 - C#ElaskanatorView Answer on Stackoverflow
Solution 10 - C#user3419724View Answer on Stackoverflow