Skip to content

Bump SDK to 10 and improve SDK check#2330

Open
JustinGrote wants to merge 3 commits into
mainfrom
chore/netsdk10
Open

Bump SDK to 10 and improve SDK check#2330
JustinGrote wants to merge 3 commits into
mainfrom
chore/netsdk10

Conversation

@JustinGrote

@JustinGrote JustinGrote commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

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

Copilot AI review requested due to automatic review settings June 25, 2026 21:10
@JustinGrote JustinGrote requested a review from a team as a code owner June 25, 2026 21:10
@JustinGrote JustinGrote enabled auto-merge (squash) June 25, 2026 21:10
@JustinGrote JustinGrote self-assigned this Jun 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.100 in global.json.
  • Replace the explicit [Version] check in FindDotNet with global.json-driven detection that parses the dotnet "SDK not found" message.
  • Rename the OneBranch UseDotNet@2 step 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.

Comment thread PowerShellEditorServices.build.ps1 Outdated
@JustinGrote JustinGrote disabled auto-merge June 25, 2026 22:50
@JustinGrote JustinGrote enabled auto-merge (rebase) June 25, 2026 22:50
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@JustinGrote

Copy link
Copy Markdown
Collaborator Author

@andyleejordan this is failing on the PS51 build InvokeScriptblock. Should I try to fix within this PR or are you addressing separately?
https://github.com/PowerShell/PowerShellEditorServices/actions/runs/28205437150/job/83554961163#step:7:1

@JustinGrote

Copy link
Copy Markdown
Collaborator Author

Passed on 2nd try, suspicious the windows test is still flaky @andyleejordan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants