Skip to content

Instantly share code, notes, and snippets.

View btpoe's full-sized avatar

Brandon Poe btpoe

View GitHub Profile
@noseratio
noseratio / make-msbuild-shim.ps1
Last active May 2, 2023 11:31
A workaround for "node-gyp is unable to find msbuild if VS2019 is installed": https://github.com/nodejs/node-gyp/issues/1663
<#
This is a workaround for "node-gyp is unable to find msbuild if VS2019 is installed"
https://github.com/nodejs/node-gyp/issues/1663
It create a shim EXE as "MSBuild\15.0\Bin\MSBuild.exe" to target "MSBuild\Current\Bin\MSBuild.exe"
By noseratio - MIT license - use at your own risk!
It requires admin mode, I use wsudo/wsudox (https://chocolatey.org/packages/wsudo) for that:
wsudo powershell -f make-msbuild-shim.ps1
#>
#Requires -RunAsAdministrator