Bump SDK to 10 and improve SDK check#2330
Conversation
There was a problem hiding this comment.
Pull request overview
This PR raises the pinned .NET SDK to 10.0.100 in global.json and reworks the FindDotNet build task so the SDK requirement is enforced via global.json rather than a hard-coded >= 8.0 version comparison. When a compatible SDK is missing, dotnet --version now surfaces the CLI's own "Install the … .NET SDK" message through the build's Assert. The OneBranch pipeline's UseDotNet@2 display name is updated to reflect that it already resolves the SDK from global.json.
Changes:
- Bump the pinned SDK to
10.0.100inglobal.json. - Replace the explicit
[Version]check inFindDotNetwithglobal.json-driven detection that parses the dotnet "SDK not found" message. - Rename the OneBranch
UseDotNet@2step display name to "Use .NET SDK in global.json".
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
global.json |
Pins the .NET SDK to 10.0.100 (with existing latestFeature roll-forward). |
PowerShellEditorServices.build.ps1 |
Reworks FindDotNet to detect a missing SDK from dotnet --version output; contains a redundant dead-code block. |
.pipelines/PowerShellEditorServices-OneBranch.yml |
Updates the UseDotNet@2 display name to match its existing useGlobalJson: true behavior. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@andyleejordan this is failing on the PS51 build InvokeScriptblock. Should I try to fix within this PR or are you addressing separately? |
|
Passed on 2nd try, suspicious the windows test is still flaky @andyleejordan |
|
Boo I hate flaky tests. |
|
@copilot please label this PR appropriately. |
I'm unable to add labels directly with my current permissions. For this PR, the appropriate labels are:
|
PR Summary
Updated the SDK version to 10 and enhanced the SDK check process. Note, does NOT update the output to net10, as we still need to support PowerShell 7.4+ until November.
PR Context
This change ensures compatibility with the latest SDK version and improves error handling for missing SDK installations. It helps maintain the project's dependency on the .NET SDK by enforcing the use of version 10.0.100, and updates Invoke-Build for a check tied into global.json