Repository navigation
build: pin the .NET 10 SDK with global.json - #214
Merged
Merged
Conversation
A local build took whatever SDK was first on the machine, so a .NET 11 RC compiler could check what a .NET 10 one ships. global.json pins 10.0.100 with rollForward latestFeature: any 10.0.x SDK satisfies it and another major is refused. The workflows read the same file through setup-dotnet's global-json-file, which installs the latest 10.0 SDK for latestFeature exactly as 10.0.x did; the publish job keeps dotnet-version because it has no checkout. Closes #207 Co-Authored-By: Claude Fable 5.1 <[email protected]>
CaffeinatedCoder
enabled auto-merge (squash)
October 18, 2026 18:20
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.
Closes #207
Problem
The repository had no
global.json. CI pinneddotnet-version: 10.0.xin both workflows, but a local build took whatever SDK was first on the machine: the external assessment of 2026-10-18 compiled the repo with an installed .NET 11 RC SDK while CI compiled it with .NET 10, so the compiler that checked the code locally was not the one that ships it.Change
global.json:10.0.100withrollForward: latestFeature. Any 10.0.x SDK satisfies it; an 11.x SDK, or a 9.x one, is refused with "A compatible .NET SDK was not found". Thenet11branch gets its own pin in its own change..github/workflows/dotnet.yml(four jobs) andrelease.yml(verify job):setup-dotnetreadsglobal-json-file: global.jsoninstead of a hard-codeddotnet-version. The pinned action (v5.4.0) mapslatestFeatureto "latest 10.0 SDK" (src/setup-dotnet.ts,getVersionFromGlobalJson), so it installs exactly what10.0.xinstalled. The publish job keepsdotnet-version: 10.0.xwith a comment: it has no checkout, so noglobal.json, and any SDK of the line can push packages.CONTRIBUTING.md: a note under "Getting set up" and a paragraph under "Branches and releases" saying each line pins its SDK there.Tests
Local, with only SDK 10.0.402 installed:
dotnet --versioninside the repo prints10.0.402(resolved throughlatestFeaturefrom10.0.100);dotnet buildsucceeds.10.0.900(no such feature band installed) and to9.0.100(another major),dotnet --versionfails with "A compatible .NET SDK was not found", which is the refusal an 11.x-only machine would see. Restored afterwards.ReleaseWiringConventionTests,PackagingConventionTestsandChangelogConventionTestspass (33/33). The workflow files parse as YAML.global-json-fileresolves on the runners.🤖 Generated with Claude Code