@@ -76,20 +76,16 @@ jobs:
7676
7777 # See https://github.com/actions/runner-images/issues/9701
7878 # Adapted from https://github.com/actions/runner-images/issues/9873#issuecomment-2139288682
79- - run : |
80- $VS_PATH = vswhere.exe -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
81- echo "VS_PATH=$VS_PATH" >> $env:GITHUB_ENV
82- echo "MSVC_VERSION=$(((Get-Content "$VS_PATH\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt") -split '\.')[0..1] -join '.')" >> $env:GITHUB_ENV
83- echo "VS_VERSION=$(((vswhere.exe -latest -property installationVersion) -split '\.')[0..1] -join '.')" >> $env:GITHUB_ENV
8479 - name : Install missing Visual Studio components
85- if : matrix.os != 'windows-2019' # This is only an issue in later Windows versions
8680 run : |
8781 Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
88- [string]$WorkloadArgs = @(
89- "Microsoft.VisualStudio.Component.VC.$Env:MSVC_VERSION.$Env:VS_VERSION.ATL"
82+ $VsInstallPath = vswhere.exe -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
83+ [string]$ComponentsToAdd = @(
84+ "Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL"
85+ "Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL.ARM64"
9086 ) | ForEach-Object {"--add $_"}
91- $ArgumentList = ('modify', '--installPath', "`"$Env:VS_PATH `"", $WorkloadArgs , '--quiet', '--norestart', '--nocache')
92- echo "cmd .exe $($ArgumentList -join ' ')"
87+ $ArgumentList = ('modify', '--installPath', "`"$VsInstallPath `"", $ComponentsToAdd , '--quiet', '--norestart', '--nocache')
88+ echo "vs_installer .exe $($ArgumentList -join ' ')"
9389 # should be run twice for some reason
9490 Start-Process -FilePath vs_installer.exe -ArgumentList $ArgumentList -Wait -PassThru -WindowStyle Hidden
9591 Start-Process -FilePath vs_installer.exe -ArgumentList $ArgumentList -Wait -PassThru -WindowStyle Hidden
0 commit comments