C#C
C#4y ago
34 replies
Brady Kelly

MSBUILD Tools error with npm install

I am trying to run
npm install
on an Angular app. The earliest error with any useful information is:
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "4.0"
Then there is a long and detailed list of errors from
npm gyp
, the first in which MSBUILD is mentioned is:
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
Then
gyp info spawn args 'build/binding.sln'
and then
gyp ERR! stack Error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
failed with exit code: 1
I have tried running
npm install --global --production windows-build-tools

as advised by a colleague and StackOverflow but that command just hangs. I understand it's a large package to download but it hung for 4 or 5 hours. Then I tried
choco install vcbuildtools

but that exits with a "Generic MSI Error". What more can I do to solve or at least diagnose this error?
Was this page helpful?