Repository navigation
build: require the .NET 10 SDK via global.json - #1186
Merged
Merged
Conversation
Microsoft.SourceLink.GitHub 11.x ships its MSBuild tasks for net10.0, so `dotnet build` with an 8.0 or 9.0 SDK fails with MSB4062. CI only passes today because the runner images happen to have SDK 10 preinstalled and nothing pins the SDK. - Add global.json requiring SDK 10.0.100 or newer (rollForward latestMajor) - Install 10.0.x in the unit, functional and release workflows; keep 8.0.x where the net8.0 tests run - Replace the release workflow's stale 5.0.x setting - Document the SDK requirement in AGENTS.md
Dor-bl
force-pushed
the
build/require-dotnet-10-sdk
branch
from
November 25, 2026 20:37
cbb5af7 to
21a5a06
Compare
Dor-bl
marked this pull request as ready for review
November 25, 2026 20:59
Dor-bl
requested review from
KazuCocoa
and
a balanced review from Copilot
and removed request for
Copilot
November 25, 2026 20:59
KazuCocoa
approved these changes
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR title
build: require the .NET 10 SDK via global.jsonRelated issue
Closes # n/a. This unblocks the Dependabot bump of Microsoft.SourceLink.GitHub to 11.0.100 (#1171).
List of changes
global.jsonrequiring SDK10.0.100or newer (rollForward: latestMajor, so SDK 11+ also works; no prereleases).unit-test.ymlandfunctional-test.yml: install the10.0.xSDK alongside8.0.x. 8.0 stays because thenet8.0tests run on that runtime.release-nuget.yml: replace the stale5.0.xsetting with10.0.x.AGENTS.md: document the SDK requirement.Types of changes
Tests
How they run: This only changes build tooling, so the existing Unit Tests and Functional Tests workflows on this PR are the check: they now build with an explicitly installed SDK 10. I could not build locally because my machine has only SDK 9.0.321. With
global.jsonin place,dotnetrefuses up front with "A compatible .NET SDK was not found", which is the intended behaviour.Documentation
Details
Microsoft.SourceLink.GitHub 11.0.100 (with its Microsoft.Build.Tasks.Git and Microsoft.SourceLink.Common dependencies) now ships its .NET Core MSBuild tasks for
net10.0. Up to 10.0.402 they targetednet8.0. Building #1171 with an SDK older than 10 fails:CI on #1171 is green only because there is no
global.json.dotnetthen uses the newest SDK on the runner, and the images happen to have SDK 10 preinstalled, whateversetup-dotnetwas told. That also applies to the NuGet release job, which asked for5.0.x. This PR states the requirement instead of relying on the runner image.There is no impact on package consumers: SourceLink is
PrivateAssets=alland a development dependency.Suggested order: merge this, then
@dependabot rebase#1171.