Skip to content

Commit 8d1021d

Browse files
kant2002Ivanidzo4ka
authored andcommitted
Support buld using VS2019 (#2388)
1 parent 6ec3280 commit 8d1021d

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/Native/build.cmd

+15-3
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,30 @@ set "VSCMD_START_DIR=%__currentScriptDir%"
4747
call "%_VSCOMNTOOLS%\VsDevCmd.bat"
4848

4949
:RunVCVars
50-
if "%VisualStudioVersion%"=="15.0" (
50+
if "%VisualStudioVersion%"=="16.0" (
51+
goto :VS2019
52+
) else if "%VisualStudioVersion%"=="15.0" (
5153
goto :VS2017
5254
) else if "%VisualStudioVersion%"=="14.0" (
5355
goto :VS2015
5456
)
5557

5658
:MissingVersion
57-
:: Can't find VS 2015 or 2017
58-
echo Error: Visual Studio 2015 or 2017 required
59+
:: Can't find VS 2015, 2017 or 2019
60+
echo Error: Visual Studio 2015, 2017 or 2019 required
5961
echo Please see https://github.com/dotnet/machinelearning/tree/master/Documentation for build instructions.
6062
exit /b 1
6163

64+
:VS2019
65+
:: Setup vars for VS2019
66+
set __PlatformToolset=v142
67+
set __VSVersion=15 2017
68+
if NOT "%__BuildArch%" == "arm64" (
69+
:: Set the environment for the native build
70+
call "%VS160COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" %__VCBuildArch%
71+
)
72+
goto :SetupDirs
73+
6274
:VS2017
6375
:: Setup vars for VS2017
6476
set __PlatformToolset=v141

0 commit comments

Comments
 (0)