Skip to content

build: migrate from .NET 9 to .NET 10 (LTS)#147

Merged
sundaramramaswamy merged 1 commit into
microsoft:mainfrom
sundaramramaswamy:docs/align-dotnet-9
May 6, 2026
Merged

build: migrate from .NET 9 to .NET 10 (LTS)#147
sundaramramaswamy merged 1 commit into
microsoft:mainfrom
sundaramramaswamy:docs/align-dotnet-9

Conversation

@sundaramramaswamy
Copy link
Copy Markdown
Collaborator

@sundaramramaswamy sundaramramaswamy commented May 5, 2026

What

Migrate the entire repo from .NET 9 to .NET 10 (LTS) as suggested by @codemonkeychris — rolling forward to the current LTS release rather than staying on .NET 9 (STS, EOL May 2026).

Why .NET 10 instead of .NET 9?

  • .NET 9 is STS — standard support ends May 2026; we'd be shipping on an end-of-life runtime almost immediately.
  • .NET 10 is LTS — long-term support until November 2028; aligns with production stability expectations.
  • CI runners already have .NET 10windows-latest ships with 10.0 SDK pre-installed; without a global.json pin, builds were already silently picking it up.
  • Windows App SDK 2.0.1 supports .NET 10 — no blocking compatibility issues.

Changes

SDK & TFM (101 projects)

  • All csproj files: net9.0-windows10.0.22621.0net10.0-windows10.0.22621.0 (5 samples were already on net10.0)
  • Added global.json pinning SDK to 10.0.100 with latestFeature roll-forward

CI Workflows

  • ci.yml, coverage.yml, release.yml: dotnet-version: 9.0.x10.0.x
  • Coverage and release artifact paths updated for net10.0 TFM

C# 14 Compatibility

  • ValidationContext.cs: renamed fieldfieldName in tuple deconstructions inside a property getter (field is a keyword in C# 14)

Documentation & Templates

  • README, CONTRIBUTING, SKILL.md: prerequisites and examples updated to .NET 10
  • Doc pipeline templates (getting-started.md.dt, readme.md.dt) and compiled guides updated
  • ai-author-skill.md, 013-doc-system-design.md: prerequisite references updated

Test Infrastructure & Benchmarks

  • TestSession.cs, WinFormsTestSession.cs, SelfTestBatch.cs: hardcoded TFM paths updated
  • CLI scaffolder template TFM updated
  • All benchmark/perf scripts updated

Bug Fix (drive-by)

  • SKILL.md: corrected ProjectReference path (..\Reactor\..\src\Reactor\)

Verification

  • Build: 0 errors ✅
  • Unit tests: 6790 passed, 3 locale-specific failures (pre-existing on main, locale PR forthcoming)
  • Selftests: ~650 passed, 1 FlexInBorder_MainAxisDistributed (pre-existing on main)

@sundaramramaswamy sundaramramaswamy force-pushed the docs/align-dotnet-9 branch 2 times, most recently from 41732e8 to a1c3b7b Compare May 5, 2026 06:18
@sundaramramaswamy
Copy link
Copy Markdown
Collaborator Author

sundaramramaswamy commented May 5, 2026

CI: Build/Tests skipped (docs-only change detected). Pack pending. Local verification: unit tests (6790 passed, 3 pre-existing failures), selftests (638 passed, 1 pre-existing failure).

@codemonkeychris
Copy link
Copy Markdown
Collaborator

Why did you select .NET 9 instead of .NET 10 to pin to? any reason to stick with older, or should we roll forward?

@codemonkeychris
Copy link
Copy Markdown
Collaborator

CI: Build/Tests skipped (docs-only change detected). Pack pending. Local verification: unit tests (6790 passed, 3 pre-existing failures), selftests (638 passed, 1 pre-existing failure). Note: global.json commit was dropped — it broke CI because some samples target net10.0 and CI only installs .NET 9. Ready for merge.

there aren't any preexisting failures. i'm still tracking down some flake tests (should be around 92% reliable). If the tests pass on re-run, it's flakey - don't bother tracking it down, I have a multi-hour stress run trying to track down the flakey tests. if it doesn't pass on re-run, it's a regression

@sundaramramaswamy
Copy link
Copy Markdown
Collaborator Author

sundaramramaswamy commented May 5, 2026

Why did you select .NET 9 instead of .NET 10 to pin to? any reason to stick with older, or should we roll forward?

As in the PR description most important projects used 9, hence 9.:

  • Core framework (src/): all net9.0 (3 projects)
  • Tests (tests/): all net9.0 (~50 projects)
  • CI (ci.yml): installs dotnet 9.0.x

dotnet 10.x is preferrable as it's LTS. Refer https://versionsof.net/core/.

@sundaramramaswamy sundaramramaswamy changed the title docs/build: align prerequisites and SDK pin to .NET 9 build: migrate to .NET 10 (LTS) May 5, 2026
@sundaramramaswamy sundaramramaswamy changed the title build: migrate to .NET 10 (LTS) docs/build: align prerequisites and SDK pin to .NET 9 May 5, 2026
@codemonkeychris
Copy link
Copy Markdown
Collaborator

Weird - i see the comment history saying you've updated to .NET 10, but the commits in the PR still only show the .NET 9 version?? is that a github bug or... ?

Upgrade all 101 projects from net9.0 to net10.0, pin SDK
via global.json (10.0.100 / latestFeature), update CI
workflows, docs, templates, benchmark scripts, and test
infrastructure paths.

Fix C# 14 'field' keyword conflict in ValidationContext
by renaming tuple variable.

Fix SKILL.md ProjectReference path
(..\Reactor\ -> ..\src\Reactor\).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sundaramramaswamy sundaramramaswamy changed the title docs/build: align prerequisites and SDK pin to .NET 9 build: migrate from .NET 9 to .NET 10 (LTS) May 6, 2026
@sundaramramaswamy
Copy link
Copy Markdown
Collaborator Author

sundaramramaswamy commented May 6, 2026

@codemonkeychris Thanks for the clarification on flaky tests.

While investigating, I discovered 3 locale-specific test failures that reproduce consistently on machines with non-US locales (e.g. en-IN). They pass on CI because windows-latest runners use en-US:

  1. FormatNumber_Default_UsesLocaleFormatting — expects 1,234.56 but gets 1,234.560. The en-US NumberDecimalDigits is 3 on current .NET/ICU versions, but the test hardcodes 2.

  2. FormatNumber_Percent_FormatsPercent — same root cause: PercentDecimalDigits is 3, test expects 2 decimal places (75.00% vs 75.000%).

  3. FormatDefaultLabel_Large_Number_Uses_Grouping — expects 1,234,567 but gets 12,34,567. This is a production bug: ChartPointProvider.FormatYValue() calls ToString("N0") without specifying CultureInfo, so it picks up the thread's current culture. Indian English uses lakh/crore grouping (12,34,567) instead of the Western 1,234,567.

All 3 reproduce identically on unmodified main — they're not regressions from this PR. I'll raise a separate PR with fixes shortly.

@sundaramramaswamy sundaramramaswamy merged commit 874e1f9 into microsoft:main May 6, 2026
6 checks passed
@sundaramramaswamy
Copy link
Copy Markdown
Collaborator Author

sundaramramaswamy commented May 6, 2026

Weird - i see the comment history saying you've updated to .NET 10, but the commits in the PR still only show the .NET 9 version?? is that a github bug or... ?

Looks like copilot was awaiting my approval. Tests succeeded so I merged it.

@sundaramramaswamy sundaramramaswamy deleted the docs/align-dotnet-9 branch May 6, 2026 10:02
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