diff --git a/vcbuild.bat b/vcbuild.bat index 86a986b3dec2f3..179da60d2646a2 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -249,7 +249,7 @@ echo Looking for Visual Studio 2019 @rem VCINSTALLDIR may be set if run from a VS Command Prompt and needs to be @rem cleared first as vswhere_usability_wrapper.cmd doesn't when it fails to @rem detect the version searched for -set "VCINSTALLDIR=" +if not defined target_env set "VCINSTALLDIR=" call tools\msvs\vswhere_usability_wrapper.cmd "[16.0,17.0)" if "_%VCINSTALLDIR%_" == "__" goto msbuild-not-found set "WIXSDKDIR=%WIX%\SDK\VS2017"