Search Engine Optimization (SEO)
in

Setting MSBuild.exe path with node

I have vs2015, vs2017 and vs2019 installed, I need them for different projects so uninstalling one isn’t really an option.

As far as I can tell, if I use msvs_version=2017, the autodetection now finds the setup for 2019 and then fails to construct the correct path for msbuild which is now at
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
instead of
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\15.0\Bin\MSBuild.exe
as node-gyp seems to expect.

https://github.com/nodejs/node-gyp/issues/1753

Now I’m fine with running the proper 2017 or 2019 and overwriting the msbuild path, doesn’t really matter to me, but I can’t find how to configure either.
I can apparently overwrite the msbuild path with the command line “–msbuild_path” and thus use vs2019 but the same parameter set globally through “npm config” seems to have no effect.
Any hints?

After some finding i found a solution. Run this command and its done.

npm config set msbuild_path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"

Author Profile

PREM KUMAR
PREM KUMAR
Hey Its..! Tech Lover , Ionic, Angular, Typescript, Dotnet Core, Node, Like Opencv, AI, ML, Robotics, Iot, Love Music, Cooking, Girls, Innovation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

What do you think?

402 Points
Upvote Downvote

Let’s Celebrate Deepawali With New Ideas

Useful NVM commands