40

The shortcut to Build a solution in Visual Studio 2008 is Ctrl + Shift + B.

I would like to know the default shortcut to Rebuild the solution.

4 Answers 4

65

The command Build.RebuildSolution is not bound to any key combination in the standard profiles. However you can use the following trick to invoke it

Alt + B, R

This will navigate to the build menu via Alt + B and then R will select the Rebuild option

2
  • Very nice trick, and compatible between Visual Studio versions since it's a menu shortcut.
    – user2324540
    May 15, 2013 at 14:08
  • Can someone explain why they wouldn't have a keyboard shortcut for rebuild? It's a pretty essential feature Feb 18, 2019 at 15:43
18

Another way is to do this:

Tools >> Options >> Environment >> Keyboard.

Locate the textbox decorated by the 'Show commands Containing' lable.

Type >> 'Build.Rebuild' Select >> the rebuild type you want, you have two options to choose from.

Locate the textbox decorated by the 'Press shortcut Keys' lable.

Hit >> 'a key on your keyboard', i.e I used F6 for solution wide rebuild. Click >> the assign button. CLick >> O.K and to exit.

Finally load up a test project to test out the short cut.

2
  • 1
    This helped me on Visual Studio 2015.
    – user4628051
    Aug 5, 2016 at 9:00
  • 1
    I cant believe, such an old post is still helping people. Wonders of internet! Jan 20, 2017 at 11:19
10

In my installation, there is no default. I am configured for C#, it's possible other configurations will define this by default, but I don't think so. You can see if there is a key assigned by going to Tools -> Customize, clicking the Keyboard... button at the bottom and typing "Build.RebuildSolution" in the Show Commands Containing edit box. If there is a key assigned, it will show up at the bottom of the dialog.

1
  • 1
    This is what I did to map Ctrl+Shift+B to be rebuild. Sep 9, 2011 at 18:13
2

There is no default shortcut to Rebuild Solution.

In addition to the ways mentioned in other answers you can perform the rebuild by

  • Create a Visual Studio Macro that rebuilds the solution and assign a keyboard shortcut to macro. The advantage of this approach is that you are no longer restricted by the commands provided in visual studio. You can create a custom operation like rebuild the solution, launch the application process and attach the visual studio debugger to the process. All this in a single keyboard shortcut!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.