Skip to content

Commit 28163e4

Browse files
committed
Update build+deploy.yml
1 parent ec964ed commit 28163e4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/build+deploy.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,33 @@ jobs:
5656
cd ..
5757
Remove-Item -LiteralPath "temp" -Force -Recurse
5858
59+
- name: Delete components
60+
run: |
61+
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
62+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
63+
$componentsToRemove= @(
64+
"Microsoft.VisualStudio.Component.VC.ATL"
65+
)
66+
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_}
67+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
68+
# should be run twice
69+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
70+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
71+
72+
- name: Install components
73+
run: |
74+
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
75+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
76+
$componentsToRemove= @(
77+
"Microsoft.VisualStudio.Component.VC.v141.ATL"
78+
"Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL"
79+
)
80+
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --add " + $_}
81+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
82+
# should be run twice
83+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
84+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
85+
5986
- name: Setup MSBuild.exe
6087
uses: microsoft/setup-msbuild@v1.1
6188

0 commit comments

Comments
 (0)