Skip to content

Update .NET SDK to 9.0.310 and use global.json for CI version control#303

Merged
michael-hawker merged 1 commit intomainfrom
dependency/dotnet/global-json-9.0.310
Feb 2, 2026
Merged

Update .NET SDK to 9.0.310 and use global.json for CI version control#303
michael-hawker merged 1 commit intomainfrom
dependency/dotnet/global-json-9.0.310

Conversation

@Arlodotexe
Copy link
Member

Problem

The current CI setup has version specified in two places:

  1. global.json with exact version (9.0.308) and rollForward: disable
  2. DOTNET_VERSION env var in workflow with floating version (9.0.x)

This led to a previous breakage when GitHub Actions runners installed 9.0.309 while global.json expected 9.0.308 (fixed in #826 by disabling rollForward).

Solution

This PR implements single source of truth for .NET SDK version:

  • Version update: 9.0.308 → 9.0.310
  • Workflow pattern: Use global-json-file: global.json input for actions/setup-dotnet@v4
  • Step reordering: Checkout repository before setup-dotnet (required for global.json access)

Changes

global.json:

  • Updated SDK version to 9.0.310

build.yml:

  • Reordered steps: actions/checkout now precedes actions/setup-dotnet
  • Changed setup-dotnet input from dotnet-version: 9.0.x to global-json-file: global.json
  • Retained DOTNET_VERSION env var for artifact-only jobs (sign, nuget) that cannot access global.json

Benefits

  • ✅ Single source of truth for SDK version
  • ✅ Prevents future version drift
  • ✅ Simplifies version updates (edit global.json only)
  • ✅ Follows setup-dotnet recommended pattern

Related

  • #826 - Disabled rollForward to prevent SDK mismatch

@Arlodotexe Arlodotexe force-pushed the dependency/dotnet/global-json-9.0.310 branch 2 times, most recently from d9bfb25 to b4c3a93 Compare February 2, 2026 23:25
- Update SDK version from 9.0.308 to 9.0.310 in global.json
- Reorder workflow steps: checkout before setup-dotnet
- Use global-json-file input for jobs with checkout

This eliminates version duplication and prevents future drift between
global.json and workflow definitions. Related to PR #826 which disabled
rollForward to prevent SDK version mismatches.
@Arlodotexe Arlodotexe force-pushed the dependency/dotnet/global-json-9.0.310 branch from b4c3a93 to 428e138 Compare February 2, 2026 23:26
@michael-hawker michael-hawker enabled auto-merge (rebase) February 2, 2026 23:40
@michael-hawker michael-hawker merged commit 0d171da into main Feb 2, 2026
11 checks passed
@michael-hawker michael-hawker deleted the dependency/dotnet/global-json-9.0.310 branch February 2, 2026 23:56
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.

2 participants