Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 Build and Run Keyboard Shortcut

In older versions of Visual Studio by pressing CTRL+F5 the C++ project was built and Run after build, automatically. In VS 2015 first you need to build the project and then run the project because CTRL+F5 does not compile the project anymore. How can I make the CTRL+F5 shortcut to do both Build+Run a C++ project?

like image 219
Mario Avatar asked Jan 02 '17 10:01

Mario


2 Answers

By default, when you press CTRL+F5 Visual Studio asks you if you want to build a changed project:

enter image description here

It looks like you selected Do not show this dialog again and pressed No.

To revert it, change HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\General\BuildOutOfDateProjects from 1 to 2.

For all possible values see __BUILDOUTOFDATEPROJECTS Enumeration.

Update (thanks to Cody Gray): Instead of editing registry, check the On Run, when projects are out of date option:

enter image description here

like image 171
Sergey Vlasov Avatar answered Oct 29 '22 21:10

Sergey Vlasov


In Visual Studio 2017 all I had to do was

F5

to build and run the project.

like image 30
Kellen Stuart Avatar answered Oct 29 '22 21:10

Kellen Stuart