Created
February 7, 2020 16:56
-
-
Save junalmeida/a9c6bbd44c271ad7c43db2deb63402b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- powershell: | | |
$VSEdition = "Enterprise" | |
$VSPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\$VSEdition" | |
$VC141 = "$VSPath\MSBuild\Microsoft\VC\v150\Platforms\x64\PlatformToolsets\v141\Toolset.props" | |
$MSBuildPath = "$VSPath\MSBuild\Current\Bin" | |
echo "##vso[task.prependpath]$MSBuildPath" | |
if ((Test-Path "$VC141") -eq $False) { | |
$VSBootstrapperURL = "https://aka.ms/vs/16/release/vs_$VSEdition.exe" | |
$FilePath = "${env:Temp}\vs_$VSEdition.exe" | |
Invoke-WebRequest -Uri $VSBootstrapperURL -OutFile "$FilePath" | |
echo "Installing VC v141 Toolset..." | |
Start-Process -FilePath $FilePath -ArgumentList "modify", "--installPath", "`"$VSPath`"", "--add", "Microsoft.VisualStudio.Component.VC.v141.x86.x64", "--quiet", "--norestart", "--wait" -Wait -PassThru | |
gci "${env:Temp}\dd_setup*.log" | sort LastWriteTime | select -last 1 | get-content | |
gci "${env:Temp}\dd_client*.log" | sort LastWriteTime | select -last 1 | get-content | |
} | |
else | |
{ | |
echo "VC v141 ToolSet already exists." | |
} | |
displayName: Workaround for node-gyp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment