Search code examples
c#visual-studio-2008

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


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?


Solution

  • 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 :)