Is there a standard keyboard shortcut to build the current project in Visual Studio?
Visual StudioKeyboard ShortcutsVisual Studio Problem Overview
I know that Ctrl + Shift + B launches a solution build, but I would like a shortcut that just builds the current project. Is a custom shortcut my only option?
Edit: Looks like a custom shortcut is my only option as Shift + F6 does not work for me.
Visual Studio Solutions
Solution 1 - Visual Studio
Assigning the shortcut to "Build.BuildOnlyProject" command doesn't seem to work in VS2008.
Assign the shortcut to "Build.BuildSelection". If you have a solution with several projects and files open from the various projects, whatever file you are currently editing will define the project that will be built when you use the assigned shortcut for "Build.BuildSelection".
You'll know the keyboard shortcut is working when you click the Build menu option and you see the keyboard shortcut on the menu itself.
btw - a restart/reboot is not required when assigning keyboard shortcuts.
Solution 2 - Visual Studio
custom shortcut depending on what keybindings you are using.....if you look in your menu it will tell you if you have a keybinding.
The other thing I have got used to, because I make use of ViEmu, is use the menu shortcuts. Which are actually quite quick to do, and are independent of bindings.
- So to build your project you go Alt + B, U
Solution 3 - Visual Studio
You can use the shortcuts already established in the main menu that are navigated with the Alt key:
At least for VS2013:
Alt + B, B -> Build Solution
Alt + B, R -> Rebuild Solution
Alt + B, U -> Build current project
Alt + B, E -> Rebuild current project
For some reason after installing Resharper I couldn't get a global shortcut to work (tried several times!!!), but as long as what you want to do is on the main menu, there is always an Alt + "Letter1", "Letter2" combination to trigger whatever action you'd like :-)
Solution 4 - Visual Studio
For C# development:
F6 or Shift+Ctrl+B - Builds all the projects in the solution.
Shift+F6 - Builds the selected project and its dependencies.
Solution 5 - Visual Studio
Visual Studio 2015/17
ALT + B + E
ALT + B = Open Build Menu
E = Rebuild Current Project
Solution 6 - Visual Studio
for C# development. Tools -> Options. Select Keyboard, select additional keyboard mapping scheme to "Visual C# 2005". This mapping has F6 as standard shortcut.
Solution 7 - Visual Studio
VS 2012 has Shift + F6 already mapped for this. I was surprised to learn this.
Solution 8 - Visual Studio
For Visual Studio 2017 community, you can use Alt+b then press u to build your current project.
Details: ALT Switch to the main menu -> choose b for build -> u choose the option of build your_project_name from the drop list.
Solution 9 - Visual Studio
In Visual Studio 2019 this has been set to Ctrl+b
Solution 10 - Visual Studio
In Visual Studio 2017 and 2019, Shift + F6 works for me.
Solution 11 - Visual Studio
As Happy Mittal said (Alt + B + J) open a drop window that select the project build, but then i had to press enter instead the last "B" (VS 2017).
Solution 12 - Visual Studio
In Visual Studio 2015, Alt + B, H will build your solution and publish it.
Solution 13 - Visual Studio
Sometimes I have to use Visual Studio in a language different than English and the navigation using Alt and a combination of keys is different. If there is someone in the same situation, I found out that is more convenient to create a keyboard shortcut to have consistency among languages. I followed the instructions from https://evanjpalmer.wordpress.com/2013/08/20/build-selection-short-cut-for-visual-studio/ to create the keyboard shortcut:
> To set this up: > > 1. Tools -> Options -> Environment -> Keyboard (Spanish: Herramientas -> Opciones -> Entorno -> Teclado) > 2. Put the cursor in “Press Keyboard Shortcut Keys” and shift CTRL+SHIFT+B > 3. In Show Commands Containing, type: Build.BuildSelection (Spanish: Compilar.Compilarselección) > 4. Select Build.BuildSelection from the drop down list and hit apply > 5. Put the cursor in “Press Keyboard Shortcut Keys” and shift CTRL+ALT+SHIFT+B > 6. In Show Commands Containing, type: Build.BuildSolution > 7. Select Build.BuildSolutionfrom the drop down list and hit apply > 8. ??? > 9. PROFIT!
Solution 14 - Visual Studio
In the Visual Studio options window, under "Keyboard", look for the "Build.BuildOnlyProject" command and you can set whatever you want.
Solution 15 - Visual Studio
press (Alt + B + J + B) these key combinations to build only current selected project of the solution (VS 2010). It selects "Build" option from toolbar (Alt + B key ) , then goto "project only" (J key ) and then "Build Only XXX" project (B key).