Skip to content

Commit 513d073

Browse files
Account for preview versions of dotnet sdk (#1731)
Fixes #1730
1 parent 8a8d381 commit 513d073

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

PowerShellEditorServices.build.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ if (Get-Command git -ErrorAction SilentlyContinue) {
5555

5656
task FindDotNet {
5757
assert (Get-Command dotnet -ErrorAction SilentlyContinue) "dotnet not found, please install it: https://aka.ms/dotnet-cli"
58-
assert ([Version](dotnet --version) -ge [Version]("6.0")) ".NET SDK 6.0 or higher is required, please update it: https://aka.ms/dotnet-cli"
58+
59+
# Strip out semantic version metadata so it can be cast to `Version`
60+
$existingVersion, $null = (dotnet --version) -split '-'
61+
assert ([Version]$existingVersion -ge [Version]("6.0")) ".NET SDK 6.0 or higher is required, please update it: https://aka.ms/dotnet-cli"
5962

6063
# Anywhere other than on a Mac with an M1 processor, we additionally
6164
# need the .NET 3.1 runtime for our netcoreapp3.1 framework.

0 commit comments

Comments
 (0)