I installed Visual Studio 2017 and toolsets v140
and v141
. To work with v140
toolset, I need to set the necessary environment via vc
I've managed to solve, so to speek, this issue using the following approach. For toolset v140
vcvars
tries to obtain the required data from the registry (Visual Studio 14.0 installation directory), but, because it fails to do so, exits with an error. If you add to the Windows registry the required value, vcvars
will work correctly. In case of toolset v140
installed along with Visual Studio 2017 this path for the default installation is C:\Program Files (x86)\Microsoft Visual Studio\Shared\14.0\
.
You need to locate the existing key where the Visual Studio 2017 installation directory is set (in my case it is HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7
) and add the key with name 14.0 and value C:\Program Files (x86)\Microsoft Visual Studio\Shared\14.0\