env.ps1 (721B)
1 # This script enables Developer Command Prompt 2 # See https://github.com/microsoft/vswhere/wiki/Start-Developer-Command-Prompt#using-powershell 3 if ($env:BUILD_ARCH -eq "arm64") { 4 $arch = "arm64" 5 $installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.arm64 -property installationPath 6 } else { 7 $arch = "x64" 8 $installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath 9 } 10 11 if ($installationPath) { 12 & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=$arch -no_logo && set" | 13 ForEach-Object { 14 $name, $value = $_ -split '=', 2 15 "$name=$value" >> $env:GITHUB_ENV 16 } 17 }