From be0a358ecef3a341d9539966a2b445cf2a4c8dfe Mon Sep 17 00:00:00 2001 From: Alexei Lozovsky Date: Sun, 14 Jun 2020 20:55:01 +0300 Subject: [PATCH] Look for vcbuildtools.bat of VS 2015 as well (#9) "Visual C++" has its build tool batch files in a different place. Let's look there as well if we have not found 2017 or 2019 stuff. Thanks to ReactOS project for figuring this out. Co-authored-by: Victor Perevertkin --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index a1c0f17..6a4941e 100644 --- a/index.js +++ b/index.js @@ -31,6 +31,11 @@ function findVcvarsall() { } } } + // Special case for Visual Studio 2015 (and maybe earlier), try it out too. + const path = `${programFiles}\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat` + if (fs.existsSync(path)) { + return path + } throw new Error('Microsoft Visual Studio not found') }