After each change VC project to recompile, every time VS will generate debug database files, it takes time, so studied how to compile directly in the resource manager, but also found a solution.
The following are the registry files that apply to Visual Studio 2008, and after importing the system, right-click the. sln file will come out of the compiled menu:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell]
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build Debug]
@=& compile debug using vcbuild
[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]
@=& compile release using vcbuild
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Bulild Release\Command]
@="cmd.exe /K \"\"C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\vcpackages\\vcbuild.exe\" \"%1\" \"Release|Win32\"\""
Since the beginning of Visual Studio 2010, Microsoft has replaced Visual C + + VCBuild with MSBuild, so the methods are somewhat different:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell]
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build Debug]
@=& compile debug using msbuild
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build Debug\Command]
@="cmd.exe /K \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /m \"%1\" /p:Configuration=Debug /t:Build\""
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Bulild Release]
@=& compile release using msbuild
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Bulild Release\Command]
@="cmd.exe /K \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /m \"%1\" /p:Configuration=Release /t:Build\""
VS2013 right-click to compile the CSharp project
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.csproj.12.0\Shell]
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.csproj.12.0\Shell\Build Debug]
@=& compile debug using msbuild
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.csproj.12.0\Shell\Build Debug\Command]
@="cmd.exe /K \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /m \"%1\" /p:Configuration=Debug /t:Build\""
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.csproj.12.0\Shell\Bulild Release]
@=& compile release using msbuild
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.csproj.12.0\Shell\Bulild Release\Command]
@="cmd.exe /K \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /m \"%1\" /p:Configuration=Release /t:Build\""
VS2013 right-click to compile the CPP project
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vcxproj.12.0\Shell]
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vcxproj.12.0\Shell\Build Debug]
@=& compile debug using msbuild
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vcxproj.12.0\Shell\Build Debug\Command]
@="cmd.exe /K \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /m \"%1\" /p:Configuration=Debug /t:Build\""
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vcxproj.12.0\Shell\Bulild Release]
@=& compile release using msbuild
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.vcxproj.12.0\Shell\Bulild Release\Command]
@="cmd.exe /K \"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe /m \"%1\" /p:Configuration=Release /t:Build\""
Other versions of VS are self-modifying the registry, which is convenient.
Note: When using MSBuild, the environment variable "Platform" is checked, and if you are not sure whether the configuration is correct, it is recommended that you remove the environment variable (Visual Studio will default to BNB when it is installed, causing MSBuild not to compile correctly, but if you start This issue does not exist if the Visual Studio IDE is compiled).
To compile the Visual Studio solution file by right-clicking the Explorer