views:

563

answers:

4

Is there a keyboard shortcut that allows you to easily change Build Configuration (say, from Debug to Release) in Visual Studio (2008)?

In the Standard Toolbar there is a drop-down where one can easily change between Build Configurations, but I only know how to access it with my mouse.

Is there an easy way this can be done via the keyboard?

+1  A: 

It doesn't seem there are, but you can set a key command (Tools -> Options -> Environment -> Keyboard) for Build.ConfigurationManager, which will open a dialogue box that you can use the cursor keys to navigate quickly.

You could also set up a macro (similar to this) and bind that to a hot key.

ravuya
+1  A: 

You can set up a key combo through the Tools -> Options -> Environment -> Keyboard dialog. The Build.SolutionConfigurations command will put your focus on the build configuration drop down so you can easily change the configuration with the arrow keys. Additionally the Build.SolutionPlatforms selects the Platform drop down. The only drawback is that focus will be taken away from whatever was previously selected.

heavyd
+1  A: 

Just for the record, it's actually not that hard to use the standard keyboard mappings for the Configuration Manager dialog:

Alt+B, O, (Arrow keys or first letter, e.g. D(ebug) or R(elease)), Enter

The dialog box pops up fairly quickly, so this works for me.

Mark Seemann
A: 

I like Mark's accessor traversal solution as I don't need to deal with macros to replicate a behaviour that is essentially already there out of the box.

I'm using accessors a lot more, particularly after getting JP Boodhoo's shortcut list. It makes doing things like adding projects, files, references, etc. a lot faster.

Jason Morse