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?
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.
Customize a keyboard shortcutOn the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard.
In VS2013, I needed to use the Command Build.BuildSelection
instead of Build.BuildOnlyProject
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With