Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to define a keyboard shortcut for building the default project in VC++ IDE?

The Visual Studio for C++ defines a keyboard shortcut F7 for building the whole solution. However, it doesn't define a keyboard shortcut for building the default project.

Usually, a solution contains many projects and one of the projects is defaulted. If I modified some code in the default project and want to build it, I must use the mouse to right-click the project name, and select the 'build' menu. It's slow and tedious.

Is there a way to define a keyboard shortcut such as F4 for building the default project?

like image 679
xmllmx Avatar asked Sep 19 '13 03:09

xmllmx


People also ask

How do I set keyboard shortcuts to default in VS Code?

To configure keyboard shortcuts through the JSON file, open Keyboard Shortcuts editor and select the Open Keyboard Shortcuts (JSON) button on the right of the editor title bar. This will open your keybindings.json file where you can overwrite the Default Keyboard Shortcuts.

How do I assign keyboard shortcuts in Visual Studio?

Customize a keyboard shortcutOn the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard.


1 Answers

In VS2013, I needed to use the Command Build.BuildSelection instead of Build.BuildOnlyProject.

enter image description here

like image 98
Mike Fuchs Avatar answered Oct 22 '22 12:10

Mike Fuchs