Skip to content

Commit 2bfc469

Browse files
committed
Fix FindDotNet task
Since `dotnet --version` can return e.g. "8.0.100 [C:\hostedtoolcache\windows\dotnet\sdk]" on CI. Also it should be requiring 8.0 now!
1 parent ce538d7 commit 2bfc469

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PowerShellEditorServices.build.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ Task FindDotNet {
7070
Assert (Get-Command dotnet -ErrorAction SilentlyContinue) "dotnet not found, please install it: https://aka.ms/dotnet-cli"
7171

7272
# Strip out semantic version metadata so it can be cast to `Version`
73-
$existingVersion, $null = (dotnet --version) -split '-'
74-
Assert ([Version]$existingVersion -ge [Version]("6.0")) ".NET SDK 6.0 or higher is required, please update it: https://aka.ms/dotnet-cli"
73+
[Version]$existingVersion, $null = (dotnet --version) -split " " -split "-"
74+
Assert ($existingVersion -ge [Version]("8.0")) ".NET SDK 8.0 or higher is required, please update it: https://aka.ms/dotnet-cli"
7575

7676
Write-Host "Using dotnet v$(dotnet --version) at path $((Get-Command dotnet).Source)" -ForegroundColor Green
7777
}

0 commit comments

Comments
 (0)