Permanent solution (+ for build-machines)
Visual Studio 2017
For VS 2017, call the following CMD scripts under your target Windows account:
Community edition
Professional edition
Enterprise
edition
TL;DR. Notes for poor DisableOutOfProcBuild.exe
, the Microsoft's offered solution that I use for VS 2017.
DisableOutOfProcBuild.exe
doesn't assume you will call it out of its installation folder. So, you can't copy this .exe file. (By the way, if you want to build .vdproj, you must install VS.)
DisableOutOfProcBuild.exe
will only work if the current CMD directory is set to the installation location of DisableOutOfProcBuild.exe.
As an example, for VS Professional edition we must call
CD "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild"
CALL DisableOutOfProcBuild.exe
Visual Studio 2015 and earlier
by CMD for the current Windows user
For many people the creation/correction under HKEY_CURRENT_USER\..
doesn't always work or work permanently.
Trying to solve this, I found that in fact I have to create/change some weird key under HKEY_USERS HKEY_USERS\S-1-5-xx-xxxxxxxxxx-xxxxxxxxx-xxxxxxxxxxx-xxxxx\...\MSBuild
But I also found that if I will be using a CMD console for HKCU
with the proposed fix
REG ADD HKCU\SOFTWARE\Microsoft\VisualStudio\14.0_Config\MSBuild /t REG_DWORD /v EnableOutOfProcBuild /d 0 /f
this will write the value exactly into that weird key HKEY_USERS\S-1-5-xx-xxxxxxxxxx-xx..., not to the HKEY_CURRENT_USER.
So, this works from a first shot and forever. Just use the CMD console.
REG ADD HKCU\SOFTWARE\Microsoft\VisualStudio\14.0_Config\MSBuild /t REG_DWORD /v EnableOutOfProcBuild /d 0 /f
@REM (use 12.0_Config for VS2013)
Solver for Build Servers
On the other hand this code always works for a current user account which launches it (because of HKEY_CURRENT_USER). But build-servers often use dedicated accounts or Local System, etc.
I fixed it on my build-machines by adding the following simple batch file to my build tasks (Jenkins, TeamCity, CruiseControl)
VS-2015,
VS-2013,
VS-2017-Community,
VS-2017-Professional,
VS-2017-Enterprise
elegant solution
) in gist, IMHO. – Benilda