每次改动 VC 工程之后都要重新编译,每次 VS 又会生成调试数据库文件,很费时间,于是研究了一下如何在资源管理器中直接编译,还真发现了解决办法。
以下是适用 Visual Studio 2008 的注册表文件,导入系统之后右键点 .sln 文件就会出来编译的菜单了:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell]
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build Debug]
@="使用 VCBuild 编译 Debug(&D)"
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build Debug\Command]
@="cmd.exe /K \"\"C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\vcpackages\\vcbuild.exe\" \"%1\" \"Debug|Win32\"\""
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Bulild Release]
@="使用 VCBuild 编译 Release(&R)"
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Bulild Release\Command]
@="cmd.exe /K \"\"C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\vcpackage