You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pin the SDK per line with a global.json (10.0.x on main, 11.0.x on net11) #207
The repository has no global.json. CI pins dotnet-version: 10.0.x in dotnet.yml and release.yml, but a local build takes whatever SDK is first on the machine. An external assessment on 2026-10-18 built the repo with an installed .NET 11 RC SDK while CI compiled with .NET 10, so the compiler that checked the code locally was not the one that ships it. (On the maintainer's machine dotnet --version is 10.0.402, so the mismatch is per machine, which is exactly why it should be pinned in the repo.)
With two lines (10.x LTS on main/release/10.x, 11.x on net11) the pin is also where the per-line SDK policy lives, and it is what #152 (CI matrix for two lines) should read instead of a hard-coded version in each workflow.
Proposed change
global.json on main: { "sdk": { "version": "10.0.100", "rollForward": "latestFeature" } } so any 10.0.x SDK satisfies it and an 11.x one is refused.
The same file on net11 with the 11 version.
Workflows read the pin (setup-dotnet honours global.json when global-json-file is set) so there is one place to bump.
A line in CONTRIBUTING.md under branches and releases saying each line pins its SDK there.
Verification
With an 11.x SDK first on PATH, dotnet --version inside the repo must print a 10.0.x version and dotnet build must use it; with no 10.x SDK installed it must fail with the SDK-not-found error rather than roll forward.
Landed as #214 with one deviation from the proposal: the release workflow's publish job keeps dotnet-version: 10.0.x (with a comment), because it has no checkout and therefore no global.json; it only pushes the verified packages. Every job that builds reads global-json-file. The net11 pin is a separate change on that branch.
Activity
CaffeinatedCoder commentedon Oct 18, 2026
Landed as #214 with one deviation from the proposal: the release workflow's publish job keeps
dotnet-version: 10.0.x(with a comment), because it has no checkout and therefore noglobal.json; it only pushes the verified packages. Every job that builds readsglobal-json-file. Thenet11pin is a separate change on that branch.