| 1 |
@REM Copyright (c) Microsoft. All rights reserved. |
| 2 |
@REM Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| 3 |
|
| 4 |
echo ***setting VC paths*** |
| 5 |
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat" ( |
| 6 |
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat" |
| 7 |
set VSVERSION="Visual Studio 15 2017" |
| 8 |
) ELSE IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" ( |
| 9 |
IF "%1" == "x64" ( |
| 10 |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 |
| 11 |
) ELSE ( |
| 12 |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" |
| 13 |
) |
| 14 |
set VSVERSION="Visual Studio 17 2022" |
| 15 |
) ELSE ( |
| 16 |
echo "ERROR: Did not find Microsoft Visual Studio" |
| 17 |
EXIT 1 |
| 18 |
) |
| 19 |
|
| 20 |
where /q msbuild |
| 21 |
IF ERRORLEVEL 1 ( |
| 22 |
echo "ERROR: Did not find msbuild" |
| 23 |
exit %ERRORLEVEL% |
| 24 |
) |
| 25 |
|
| 26 |
where msbuild |
| 27 |
msbuild -version |