Skip to content

Commit

Permalink
Trying to skip step Delete Visual Studio components. It may not be …
Browse files Browse the repository at this point in the history
…required for #157
  • Loading branch information
end2endzone committed Aug 11, 2024
1 parent f2ed5ac commit 08f6edd
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@ jobs:

# Force reinstall of ATL through update of Visual Studio 2022 VC components
# See https://github.com/actions/runner-images/issues/9873 for details.
- name: Delete Visual Studio components
shell: pwsh
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToRemove= @(
"Microsoft.VisualStudio.Component.VC.ATL"
"Microsoft.VisualStudio.Component.VC.ATL.Spectre"
"Microsoft.VisualStudio.Component.VC.ATLMFC"
"Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre"
)
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# should be run twice
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
#- name: Delete Visual Studio components
# shell: pwsh
# run: |
# Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
# $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
# $componentsToRemove= @(
# "Microsoft.VisualStudio.Component.VC.ATL"
# "Microsoft.VisualStudio.Component.VC.ATL.Spectre"
# "Microsoft.VisualStudio.Component.VC.ATLMFC"
# "Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre"
# )
# [string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_}
# $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# # should be run twice
# $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
# $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden

- name: Install Visual Studio components
shell: pwsh
Expand Down

0 comments on commit 08f6edd

Please sign in to comment.