fix: honor global.json in docs workflow#1076
Merged
wieslawsoltes merged 1 commit intomasterfrom Mar 13, 2026
Merged
Conversation
This was referenced Apr 9, 2026
Closed
Closed
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.
Overview
This change fixes the GitHub Actions
Docsworkflow so it resolves the same.NET SDK version as the rest of the repository. The workflow was installing a
floating
10.0.xSDK while the repository rootglobal.jsonrequires10.0.200exactly and disables SDK roll-forward.That mismatch caused
dotnet tool restoreto fail on GitHub-hosted runners oncethe runner image exposed
10.0.201instead of10.0.200.Problem
The repository currently pins the SDK in
global.json:version:10.0.200rollForward:disableMost CI workflows already respect that by using:
The
Docsworkflow was the exception. Its setup step used:On the March 13, 2026 runner image,
10.0.xresolved to10.0.201. Becausethe repo explicitly disables roll-forward, any
dotnetcommand executed fromthe repository root tried to find
10.0.200and failed before it could run therequested SDK command.
Observed failure:
DocsRestore local toolsdotnet tool restore10.0.200Root Cause
The issue was not with the local tools manifest or DocFX itself.
The root cause was inconsistent SDK provisioning across workflows:
build.yml,release.yml,nightly.yml, andleak-tests.ymluseglobal-json-file: global.jsondocs.ymlinstalled a floating10.0.xSDK insteadThat meant the docs job could drift to a different patch version than the one
required by the repository.
Change Made
Updated
.github/workflows/docs.ymlso theSetup .NET SDKsstep now includes:The explicit floating
10.0.xentry was removed, while the existing8.0.xand
6.0.xentries were preserved.Result:
for multi-targeting or documentation generation
Why This Fix
This is the narrowest correct fix.
Alternative options were considered:
global.jsonto10.0.201global.jsonThose options would broaden repository-wide SDK behavior. The existing exact pin
appears intentional, and the failure was isolated to the one workflow that did
not honor that pin. Aligning the workflow with the repository contract is safer
than weakening the repository contract to accommodate one workflow.
Validation
Local validation performed:
dotnet tool restorefrom the repository root succeededgit diff --checkpassedSDK selection strategy
GitHub validation expected after push:
Docsworkflow should install10.0.200viaglobal.jsondotnet tool restoreshould stop failing with exit code155Risk Assessment
Risk is low.
introducing a new pattern
Potential residual risk:
this change would remove that behavior. That is unlikely and would contradict
the repository's current exact SDK pinning strategy.
Files Changed
.github/workflows/docs.yml