Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pipelines/PowerShellEditorServices-OneBranch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ extends:
system: Custom
customVersion: $(package.version)
- task: UseDotNet@2
displayName: Use .NET 8.x SDK
displayName: Use .NET SDK in global.json
inputs:
packageType: sdk
useGlobalJson: true
Expand Down
12 changes: 7 additions & 5 deletions PowerShellEditorServices.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ if (Get-Command git -ErrorAction SilentlyContinue) {
Task FindDotNet {
Assert (Get-Command dotnet -ErrorAction SilentlyContinue) "dotnet not found, please install it: https://aka.ms/dotnet-cli"

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

Write-Build DarkGreen "Using dotnet v$(dotnet --version) at path $((Get-Command dotnet).Source)"
[string[]]$dotnetInfo = dotnet --version 2>&1
$missingDotnet = ($dotnetInfo -match '(Install the .+ \.NET SDK) or update')[0]
if ($missingDotnet) {
$missingDotnetMessage = $missingDotnet[0] -replace 'or update.+'
}
Assert (!$missingDotnet) ($missingDotnet -replace 'or update.+')
Comment thread
Copilot marked this conversation as resolved.
Outdated
Write-Build DarkGreen "Using dotnet v$($dotnetInfo) at path $((Get-Command dotnet).Source)"
}

Task Clean FindDotNet, {
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.416",
"version": "10.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
Loading