views:

2289

answers:

4

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.

+1  A: 

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 a lot 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
Keith Nicholas
Oooh that damn keyboard shortcut window is insidious..hundreds of actions in a listbox with only 4 viewable lines and no resize
Luke
I know! I keep wondering when they will redesign it, its been like that for a few versions now!
Keith Nicholas
I guess the search function works pretty well for paring it down as long as you know what you're looking for.
Luke
+1  A: 

In the Visual Studio options window, under "Keyboard", look for the "Build.BuildOnlyProject" command and you can set whatever you want.

Jon Tackabury
Actually this is incorrect, BuildSelection builds the current project.
John Sheehan
+23  A: 

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.

Metro Smurf
It doesn't seem to work if you don't select the project in the Solution Explorer
Román
You need a file open and have focus on the file; the project the file belongs to will build with Build.BuildSelection.
Metro Smurf
+1  A: 

for C# development. Tools -> Options. Select Keyboard, select additional keyboard mapping scheme to "Visual C# 2005". This mapping has "F6" as standard shortcut.

Saar