Skip to content

Commit 3b91a78

Browse files
[windows-2025] Fix .Net 8 SDK installation (#11564)
1 parent 13666fe commit 3b91a78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

images/windows/scripts/build/Install-DotnetSDK.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ $installScriptPath = Invoke-DownloadWithRetry -Url "https://dot.net/v1/dotnet-in
9797

9898
# Visual Studio 2022 pre-creates sdk-manifests/8.0.100 folder, causing dotnet-install to skip manifests creation
9999
# https://github.com/actions/runner-images/issues/11402
100-
if (Test-IsWin22 -or Test-IsWin25) {
100+
if ((Test-IsWin22) -or (Test-IsWin25)) {
101101
$sdkManifestPath = "C:\Program Files\dotnet\sdk-manifests\8.0.100"
102102
if (Test-Path $sdkManifestPath) {
103103
Move-Item -Path $sdkManifestPath -Destination $env:TEMP_DIR -ErrorAction Stop
@@ -117,7 +117,7 @@ foreach ($dotnetVersion in $dotnetToolset.versions) {
117117

118118
# Replace manifests inside sdk-manifests/8.0.100 folder with ones from Visual Studio
119119
# https://github.com/actions/runner-images/issues/11402
120-
if (Test-IsWin22 -or Test-IsWin25) {
120+
if ((Test-IsWin22) -or (Test-IsWin25)) {
121121
if (Test-Path "${env:TEMP_DIR}\8.0.100") {
122122
Get-ChildItem -Path "${env:TEMP_DIR}\8.0.100" | ForEach-Object {
123123
Remove-Item -Path "$sdkManifestPath\$($_.BaseName)" -Recurse -Force | Out-Null

0 commit comments

Comments
 (0)