Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
win: Support Visual Studio 2019 #1715
Description of change
referenced this pull request
Apr 9, 2019
Problem is MSVS2019 comes with 14.2 toolset, so in that case it needs to set:
But anyway, as soon as GYP3 passes all tests on 2017 & 2019, I'll PR to replace the old GYP, so we won't need these tricks (GYP3 has full support for MSVS 2017 & 2019)
bnoordhuis left a comment
I'm not 100% convinced this is the right approach but I'm willing to be persuaded that it's better than the alternatives.
Right now this doesn't really make node-gyp support VS 2019, it just makes it look for msbuild.exe in an alternative location.
There is existing support for detecting VS 2017, see commit ae141e1, and for detecting older VS versions by scanning the registry, see
Aside: this PR needs a rebase against master. Someone force-pushed to the repo a while ago, invalidating the merge base. :-/
@syohex support ended up landing from another PR, I believe we can close this one now. Thanks for working on this and opening this PR.
node-gyp v5.0.0 is out with Visual Studio 2019 support. It's not yet integrated into npm so it has to be installed manually. This should do it:
That is, install node-gyp globally and make the npm config variable
How to undo this after node-gyp is integrated into npm
npm uninstall --global node-gyp npm config delete node_gyp