Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

Commit 38a6bb6

Browse files
committed
Update build script to accept a pre-release VS & remove an unnecessary env var
1 parent 045b5f9 commit 38a6bb6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

build.cmd

+4-5
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ IF NOT EXIST %VSWHERELOCATION% (
1010
goto :error
1111
)
1212

13-
for /f "usebackq tokens=*" %%i in (`%VSWHERELOCATION% -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
14-
set _vsDir=%%i
13+
for /f "usebackq tokens=*" %%i in (`%VSWHERELOCATION% -latest -prerelease -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
14+
set BUILD_TOOLS_PATH="%%i\MSBuild\15.0\Bin\MSBuild.exe"
1515
)
1616

17-
if exist "%_vsDir%\MSBuild\15.0\Bin\MSBuild.exe" (
18-
set BUILD_TOOLS_PATH="%_vsDir%\MSBuild\15.0\Bin\MSBuild.exe"
19-
goto :restore
17+
if exist %BUILD_TOOLS_PATH% (
18+
goto :restore
2019
)
2120

2221
:error

0 commit comments

Comments
 (0)