This will usually solve the problem:
- Run on an elevated command prompt (admin):
npm install --global --production windows-build-tools.
npmis required and my recommended package manager. - Change ownership of the install dir (in my case
C:\Program Files (x86)\MSBuild\14.0) to your user, instead of admin. (properties>Security>Advanced).
Sometimes step 2 is unnecessary. It is still recommended to avoid having to use admin console for some commands.