|
1 | 1 | ::-------------------------------------------------------------------------------------------------------
|
2 | 2 | :: Copyright (C) Microsoft. All rights reserved.
|
| 3 | +:: Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved. |
3 | 4 | :: Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
|
4 | 5 | ::-------------------------------------------------------------------------------------------------------
|
5 | 6 |
|
|
10 | 11 | set FORCE_MSBUILD_VERSION=%1
|
11 | 12 |
|
12 | 13 | if "%FORCE_MSBUILD_VERSION%" == "msbuild14" (
|
13 |
| - echo Skipping Dev16 and trying Dev14... |
| 14 | + echo Skipping Dev17 and trying Dev14... |
14 | 15 | goto :LABEL_USE_MSBUILD_14
|
15 | 16 | )
|
16 | 17 | if "%FORCE_MSBUILD_VERSION%" == "msbuild15" (
|
17 |
| - echo Skipping Dev16 and trying Dev15... |
| 18 | + echo Skipping Dev17 and trying Dev15... |
18 | 19 | goto :LABEL_USE_MSBUILD_15
|
19 | 20 | )
|
| 21 | +if "%FORCE_MSBUILD_VERSION%" == "msbuild16" ( |
| 22 | + echo Skipping Dev17 and trying Dev16... |
| 23 | + goto :LABEL_USE_MSBUILD_16 |
| 24 | +) |
20 | 25 |
|
21 | 26 | where /q msbuild.exe
|
22 | 27 | if "%ERRORLEVEL%" == "0" (
|
23 | 28 | goto :SkipMsBuildSetup
|
24 | 29 | )
|
25 | 30 |
|
26 |
| -REM Try Dev16 first |
| 31 | +REM Try Dev17 first, then older versions |
| 32 | + |
| 33 | +echo Trying to locate Dev17... |
| 34 | + |
| 35 | +:LABEL_USE_MSBUILD_17 |
| 36 | +set MSBUILD_VERSION=17.0 |
| 37 | +set "MSBUILD_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Enterprise\MSBuild\%MSBUILD_VERSION%\Bin" |
| 38 | + |
| 39 | +if not exist "%MSBUILD_PATH%\msbuild.exe" ( |
| 40 | + set "MSBUILD_PATH=%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64" |
| 41 | +) |
| 42 | + |
| 43 | +if not exist "%MSBUILD_PATH%\msbuild.exe" ( |
| 44 | + set "MSBUILD_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin" |
| 45 | +) |
| 46 | + |
| 47 | +if not exist "%MSBUILD_PATH%\msbuild.exe" ( |
| 48 | + set "MSBUILD_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64" |
| 49 | +) |
| 50 | + |
| 51 | +if exist "%MSBUILD_PATH%\msbuild.exe" ( |
| 52 | + goto :MSBuildFound |
| 53 | +) |
27 | 54 |
|
28 |
| -echo Trying to locate Dev16... |
| 55 | +echo Dev17 not found, trying to locate Dev16... |
29 | 56 |
|
30 | 57 | :LABEL_USE_MSBUILD_16
|
31 | 58 | set MSBUILD_VERSION=16.0
|
|
0 commit comments