Skip to content

Commit f2c1ad4

Browse files
committed
add support for vs2019
1 parent 6f09895 commit f2c1ad4

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

Build/Common.Build.Default.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<PlatformToolset Condition="'$(BuildToolVersion)'=='12.0'">v120</PlatformToolset>
1818
<PlatformToolset Condition="'$(BuildToolVersion)'=='14.0'">v140</PlatformToolset>
1919
<PlatformToolset Condition="'$(BuildToolVersion)'=='15.0'">v141</PlatformToolset>
20+
<PlatformToolset Condition="'$(BuildToolVersion)'=='16.0'">v142</PlatformToolset>
2021
</PropertyGroup>
2122

2223
<!-- Default ChakraDevConfigDir -->

Build/scripts/add_msbuild_path.cmd

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,48 @@
66
:: add_msbuild_path.cmd
77
::
88
:: Locate msbuild.exe and add it to the PATH
9+
@echo off
910
set FORCE_MSBUILD_VERSION=%1
1011

1112
if "%FORCE_MSBUILD_VERSION%" == "msbuild14" (
12-
echo Skipping Dev15 and trying Dev14...
13+
echo Skipping Dev16 and trying Dev14...
1314
goto :LABEL_USE_MSBUILD_14
1415
)
16+
if "%FORCE_MSBUILD_VERSION%" == "msbuild15" (
17+
echo Skipping Dev16 and trying Dev15...
18+
goto :LABEL_USE_MSBUILD_15
19+
)
1520

1621
where /q msbuild.exe
1722
if "%ERRORLEVEL%" == "0" (
1823
goto :SkipMsBuildSetup
1924
)
2025

21-
REM Try Dev15 first
26+
REM Try Dev16 first
27+
28+
echo Trying to locate Dev16...
29+
30+
:LABEL_USE_MSBUILD_16
31+
set MSBUILD_VERSION=16.0
32+
set "MSBUILD_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Enterprise\MSBuild\%MSBUILD_VERSION%\Bin"
33+
34+
if not exist "%MSBUILD_PATH%\msbuild.exe" (
35+
set "MSBUILD_PATH=%ProgramFiles%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\x86"
36+
)
37+
38+
if not exist "%MSBUILD_PATH%\msbuild.exe" (
39+
set "MSBUILD_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
40+
)
41+
42+
if not exist "%MSBUILD_PATH%\msbuild.exe" (
43+
set "MSBUILD_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64"
44+
)
45+
46+
if exist "%MSBUILD_PATH%\msbuild.exe" (
47+
goto :MSBuildFound
48+
)
2249

23-
echo Trying to locate Dev15...
50+
echo Dev16 not found, trying to locate Dev15...
2451

2552
:LABEL_USE_MSBUILD_15
2653
set MSBUILD_VERSION=15.0

tools/run_msbuild.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def main(sln, outdir, target_gen_dir, *flags):
3737
print "Visual Studio not found!!"
3838
return 1
3939

40-
msbuildPath = os.path.join(vsInstallRoot["path"], r"MSBuild\15.0\Bin\MSBuild.exe")
40+
msbuildPath = os.path.join(vsInstallRoot["path"], r"MSBuild\Current\Bin\MSBuild.exe")
41+
if not os.path.exists(msbuildPath):
42+
msbuildPath = os.path.join(vsInstallRoot["path"], r"MSBuild\15.0\Bin\MSBuild.exe")
4143
args = [msbuildPath, os.path.normpath(sln)] + list(flags)
4244

4345
print "== BUILDING CHAKRACORE:"

0 commit comments

Comments
 (0)