]>
Commit | Line | Data |
---|---|---|
7490fba7 AV |
1 | @REM check and set Visual Studio environment\r |
2 | rem There is vswhere.exe starting VS2017U2\r | |
5409a478 AV |
3 | if "%VSWHERE%"=="" set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"\r |
4 | \r | |
5 | rem Use %ProgramFiles% in a 32-bit program prior to Windows 10)\r | |
6 | If Not Exist "%VSWHERE%" set "VSWHERE=%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe"\r | |
7 | \r | |
8 | If Not Exist "%VSWHERE%" (\r | |
9 | echo "WARNING: Can't find vswhere.exe. It is a part of VS 2017 version 15.2 or later. Trying known path..."\r | |
7490fba7 | 10 | set "InstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"\r |
5409a478 AV |
11 | ) ELSE (\r |
12 | for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (\r | |
13 | set InstallDir=%%i\r | |
14 | )\r | |
15 | )\r | |
16 | \r | |
17 | echo Install dir is "%InstallDir%"\r | |
7490fba7 AV |
18 | if exist "%InstallDir%\MSBuild\Current\Bin\MSBuild.exe" (\r |
19 | set msbuild="%InstallDir%\MSBuild\Current\Bin\MSBuild.exe"\r | |
5409a478 | 20 | )\r |