While running an npm install
that required a node-gyp rebuild, the following build error was thrown:
MSB8020: The build tools for v120 (Platf
I'll share this answer since none of the other fixes resolved my issue. I was having the same errors but setting the msvs param:
npm install --msvs_version=2015
was not solving the problem. I could see that it was looking in the wrong place for the toolset no matter what I did.
Long story short I learned that MSBuild is now packaged with Visual Studio and no longer packaged with .NET. Sure enough I had this entry in the PATH variable:
C:\Windows\Microsoft.NET\Framework\v4.0.30319;
and consequently the wrong (old) version of MSBuild was being called. I removed this entry and added the following path which is relevant for VS2015:
C:\Program Files (x86)\MSBuild\14.0\Bin\
Problem solved.