Skip to content

build: fix detection of Visual Studio 2017

Rodrigo Muino Tomonari requested to merge github/fork/richardlau/vs2017 into master

When run in a Visual Studio 2017 command prompt the VCINSTALLDIR environment variable will be already set and is not cleared by the tools/msvs/vswhere_usability_wrapper.cmd utility when it fails to find Visual Studio 2019. This causes vcbuild.bat to incorrectly assume Visual Studio 2019 and generate an incompatible configuration.

Clearing the value of VCINSTALLDIR before calling the utility fixes the detection logic.

Fixes: https://github.com/nodejs/node/issues/30118 Refs: https://github.com/nodejs/node/pull/30022

cc @nodejs/platform-windows @nodejs/build-files @targos

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading