Add the -prelease switch to vswhere in build scripts to allow them to find prerelease versions of Visual Studio. This fixes building on a machine that only has C++ installed in a preview build of VS 2017. (#4696)

This commit is contained in:
Morgan Brown 2017-10-09 22:20:25 -07:00 коммит произвёл Jan Kotas
Родитель 808e0e126f
Коммит 8f423ff109
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -118,7 +118,7 @@ if defined VisualStudioVersion goto :RunVCVars
set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if exist %_VSWHERE% (
for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
)
if not exist "%_VSCOMNTOOLS%" goto :MissingVersion

Просмотреть файл

@ -107,7 +107,7 @@ if defined VisualStudioVersion goto :RunVCVars
set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if exist %_VSWHERE% (
for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
)
call "%_VSCOMNTOOLS%\VsDevCmd.bat"