From bc925d890979fe73c4cc70bb399600a24ca10f2a Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Thu, 16 May 2019 06:57:26 +0300 Subject: [PATCH] tools: search for MSBuild in prerelease versions of MSVS (#795) --- tools/razzle.cmd | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/razzle.cmd b/tools/razzle.cmd index 4534f30ad..c9fbce7e5 100644 --- a/tools/razzle.cmd +++ b/tools/razzle.cmd @@ -41,6 +41,13 @@ for /f "usebackq tokens=*" %%B in (`%VSWHERE% -latest -products * -requires Micr set MSBUILD=%%B ) +rem Try to find MSBuild in prerelease versions of MSVS +if not defined MSBUILD ( + for /f "usebackq tokens=*" %%B in (`%VSWHERE% -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe 2^>nul`) do ( + set MSBUILD=%%B + ) +) + if not defined MSBUILD ( echo Could not find MsBuild on your machine. Please set the MSBUILD variable to the location of MSBuild.exe and run razzle again. goto :EXIT