Visual Studio 2015生成和运行键盘快捷键 [英] Visual Studio 2015 Build and Run Keyboard Shortcut
问题描述
在旧版本的Visual Studio中,通过按CTRL + F5组合键即可构建C ++项目,并在构建后自动运行. 在VS 2015中,首先需要构建项目,然后运行项目,因为CTRL + F5不再编译项目. 如何制作CTRL + F5快捷键来同时执行Build + Run C ++项目?
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?
推荐答案
默认情况下,当您按CTRL + F5时,Visual Studio会询问您是否要生成更改的项目:
By default, when you press CTRL+F5 Visual Studio asks you if you want to build a changed project:
您似乎选择了不再显示此对话框,然后按了否.
It looks like you selected Do not show this dialog again and pressed No.
要还原它,请将HKEY_CURRENT_USER \ Software \ Microsoft \ VisualStudio \ 14.0 \ General \ BuildOutOfDateProjects从1更改为2.
To revert it, change HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\General\BuildOutOfDateProjects from 1 to 2.
有关所有可能的值,请参见 __BUILDOUTOFDATEPROJECTS枚举.
For all possible values see __BUILDOUTOFDATEPROJECTS Enumeration.
更新(感谢Cody Gray):无需编辑注册表,而是在项目过期时检查运行时选项:
Update (thanks to Cody Gray): Instead of editing registry, check the On Run, when projects are out of date option:
这篇关于Visual Studio 2015生成和运行键盘快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!