Skip to content

Commit c28e3ed

Browse files
[release/v7.5] Add default .NET install path for SDK validation (PowerShell#25338)
Co-authored-by: Aditya Patwardhan <[email protected]>
1 parent 06334cc commit c28e3ed

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.pipelines/templates/release-validate-sdk.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,16 @@ jobs:
8787
Get-Content $nugetPath
8888
8989
# Add workaround to unblock xUnit testing see issue: https://github.com/dotnet/sdk/issues/26462
90-
$dotnetPath = if ($IsWindows) { "$env:LocalAppData\Microsoft\dotnet" } else { "$env:HOME/.dotnet" }
90+
91+
$possibleDotnetLocation = "$env:ProgramFiles\dotnet"
92+
93+
$dotnetPath = if ($IsWindows) {
94+
if (Test-Path $possibleDotnetLocation) { $possibleDotnetLocation } else { "$env:LocalAppData\Microsoft\dotnet" }
95+
}
96+
else {
97+
"$env:HOME/.dotnet"
98+
}
99+
91100
$env:DOTNET_ROOT = $dotnetPath
92101
93102
dotnet --info

0 commit comments

Comments
 (0)