Skip to content

fix(build): pin the SDK to a version CI has, and derive it in one place - #68

Merged
AresConnor merged 1 commit into
masterfrom
fix/pin-sdk-to-a-version-ci-has
Jul 29, 2026
Merged

AresConnor merged 1 commit into
masterfrom
fix/pin-sdk-to-a-version-ci-has

Conversation

@AresConnor

Copy link
Copy Markdown
Contributor

master is currently red. Every protocol-tests job on c785cae6 fails at restore:

A compatible .NET SDK was not found.
##[error]Process completed with exit code 1

a54f6f9a set global.json to 10.0.302 with rollForward: disable. The runners carry
10.0.109, 10.0.201, 10.0.204 and 10.0.301 — not 10.0.302 — and
.github/workflows/protocol-tests.yml still asked setup-dotnet for 10.0.201, so nothing on the
machine satisfied the pin.

What this changes

  1. global.json back to 10.0.201. The runners have it, and it is the version the payload
    fingerprints in docs/preview1-package-pin.md and docs/preview2-package-pin.md are recorded
    against.
  2. Every setup-dotnet step now uses global-json-file: global.json instead of restating a
    version.

Why the second half matters more than the first

The pin and the workflows each stated the SDK independently, so they could disagree — and have now
done so twice, in opposite directions:

what happened result
abfe0fcb deleted global.json; workflows still said 10.0.201 muxer silently chose the newest installed SDK (10.0.301); the generator's duplicate project instances began colliding and CI went red (fixed by #61)
a54f6f9a pinned 10.0.302; workflows still said 10.0.201 no SDK on the machine matches; restore fails outright

Restoring the pin alone would fix today's symptom and leave the mechanism in place for a third
occurrence. With global-json-file there is one statement of the version and no second place for it
to drift.

For whoever hits this locally

rollForward is disable, so a machine whose default is 10.0.302 will not build. Install the
pinned SDK rather than bumping the pin:

dotnet-install --version 10.0.201

That friction is real, and the durable fix is to make a newer band safe rather than to widen the
pin: #62 must be resolved before moving to 10.0.3xx, because that band is exactly where the
generator's duplicate project instances collide. Bumping the pin without it re-creates the failure
#61 fixed.

Verification

The failure is environmental to the runner image, so CI on this PR is the meaningful check — a green
protocol-tests here demonstrates both that the pinned SDK resolves and that global-json-file
supplies it correctly.

a54f6f9 set global.json to 10.0.302 with rollForward disable. The runners carry
10.0.109, 10.0.201, 10.0.204 and 10.0.301, so every job now fails restore with
"A compatible .NET SDK was not found" and master is red.

Pin back to 10.0.201, which the runners have and which the package fingerprints
in docs/preview{1,2}-package-pin.md are recorded against.

The deeper problem is that the pin and the workflows stated the SDK separately
and could disagree. That has now bitten twice in opposite directions: abfe0fc
deleted global.json so the muxer silently chose the newest SDK while the
workflows still declared 10.0.201, and a54f6f9 pinned a version the workflows
never install. Every setup-dotnet now reads global-json-file, so there is one
statement of the SDK version and no second place for it to drift.

Note for anyone hitting this from a machine without 10.0.201: rollForward is
disable, so install it rather than bumping the pin --
`dotnet-install --version 10.0.201`. Moving to a 10.0.3xx band also needs #62
resolved first: that band is where the generator's duplicate project instances
start colliding, which is what made CI red before #61.
@AresConnor
AresConnor merged commit d10286c into master Jul 29, 2026
3 of 4 checks passed
@AresConnor
AresConnor deleted the fix/pin-sdk-to-a-version-ci-has branch July 29, 2026 12:42
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.

1 participant