Skip to content

Move to .NET 10 (LTS), keeping Uno.Sdk 6.7.45 - #18

Merged
gmurray81 merged 5 commits into
vnextfrom
btraykov/dotnet-10
Nov 11, 2026
Merged

gmurray81 merged 5 commits into
vnextfrom
btraykov/dotnet-10

Conversation

@turbobobbytraykov

@turbobobbytraykov turbobobbytraykov commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

.NET 9 support ended on 2026-11-10; 9.0.23 was its last patch. This PR moves the samples browser, the 331 standalone samples, the sample template and the two CI helper tools to .NET 10, the current LTS (supported until 2028-11-14). Uno.Sdk stays at 6.7.45 and the Infragistics packages at 26.1.1000-alpha.25.

Before the showcase: what to decide

Changes

  • global.json: SDK 9.0.315 → 10.0.100, still with rollForward: latestPatch, so it uses the newest 10.0.1xx installed.
    • CI gets the newest 10.0.1xx too, 10.0.115 today: actions/setup-dotnet applies latestPatch. vnext's 9.0.315 pin built with 9.0.321, as the Emscripten cache key shows.
    • The 1xx band is the one Visual Studio 2022 17.14 can load: its SDKs require MSBuild 17.14, while 10.0.2xx and later require MSBuild 18 (Visual Studio 2026).
    • Commits 255506c and 8776d27 pinned .NET 9 because Visual Studio 2022 couldn't load the projects once the .NET 10 SDK was installed (it picked a newer band). Pinning the 1xx band avoids that.
  • Target frameworks: net9.0-* → net10.0-* in SamplesBrowser.csproj, all 331 samples/**/Sample.csproj, and scripts/uno-template/Sample.csproj (so newly scaffolded samples match). The $(InfragisticsUnoBuild)\net9.0\ HintPaths stay: that folder is the libraries' own build output, and net10.0 apps use the net9.0 libraries as they are.
  • tests/SampleLinks and scripts/source-viewer: net9.0 → net10.0. CI runs them with dotnet run, and with only the .NET 10 runtime installed a net9.0 tool would not start.
  • Workflow: --framework and TargetFrameworks → net10.0-browserwasm. The publish flags, the Emscripten cache (WasmCachePath still works) and the Validate deployable site checks pass as they are.
  • Publish targets: PublishDocumentationSource, and the targets from Turn off the PWA service worker #12, Preload only the six Open Sans faces the samples use #13 and Ship only Brotli copies of the WebAssembly site #14 (PublishRetiringServiceWorker, PublishOpenSansSubset, DropGzipCopies), now run for net10.0-browserwasm. Their comments name the .NET 10 bootstrapper and SDK too: both still write service-worker.js and .gz copies.
  • SampleHostPage.xaml.cs: WebView2 → Microsoft.UI.Xaml.Controls.WebView2. On net10.0-desktop, Uno 6.7 adds the WebView2Aot package, and the unqualified name then resolves to a namespace (CS0118), so the desktop head didn't compile.
  • README: IDE and SDK requirements, and the publish example.

What the WebAssembly build changes

I did a local AOT publish of this branch, after merging vnext 7c3993e, with the CI flags, and compared it with CI's .NET 9 build of the same commit.

  • Bootstrapper: Uno.Sdk 6.7.45 picks Uno.Wasm.Bootstrap 10.0.98 for net10.0 instead of 9.0.23. Uno.WinUI 6.7.359, SkiaSharp 3.119.4 and HarfBuzzSharp 8.3.1.1 are unchanged.
  • Files: blazor.boot.json and the unfingerprinted dotnet.js are gone. dotnet.<hash>.js replaces them, and uno-config.js names it. 1,383 → 1,378 files.
  • Size:
    • dotnet.native.wasm is 112.3 → 116.3 MB raw, but only 18.40 → 18.54 MB as Brotli.
    • All Brotli copies together: 33.39 → 33.58 MB.
  • Warnings: none new. The six IL2026 trim warnings are gone; the IL2075 and IL2104 ones are unchanged.

Tested locally

Sites were served by IIS Express with the site's own web.config and loaded in headless Chrome. nginx and CloudFront weren't involved.

After merging vnext (with #9 and #11–#14):

Before that merge (A/B against .NET 9, two runs per build):

  • All 331 samples, opened as direct links (the documentation iframe view), with screenshots compared pixel by pixel:

    • The same 328 render on both, and the same 3 fail on both:
    • No new console errors.
    • Median load time per sample: 906–931 ms → 658–664 ms. None is twice as slow.
    • All 12 screenshot differences are timing or live data:
      • In 9 samples, .NET 9 still showed Uno's splash, or its progress bar, 2.5 s after the sample loaded.
      • binding-live-data and pie-chart/animation show live or animated data. I compared the two binding-live-data screenshots by eye: both render the full grid.
      • charts/toolbar/custom-tool logs the same CORS error on both builds. It fetches an icon from svgrepo.com, which is blocked whichever build serves it.
  • Startup of the full app (home page, 2 sessions × 4 loads per build; the PWA was still on then):

    • first load: 7.70 → 8.02 s
    • repeat load: 6.91 → 6.62 s

    Both differences are within run-to-run variation.

  • Desktop head: all 331 samples, Release builds on Windows, through the repository's own smoke runner (SAMPLES_SMOKE in SmokeRunner.cs), including its property-editor interactions. .NET 9 (vnext 7c3993e) and .NET 10 behave the same:

    • .NET 9: 330 OK; .NET 10: 329 OK. No failures and no unhandled exceptions on either.
    • The same two blank renders: the Bing and Esri imagery maps, which depend on external tile services.
    • The same 191 property-editor interactions, with the same outcomes.
    • Both froze on charts/data-chart/data-annotation-multiple-with-stocks, which also hangs in the browser on both versions. That's a data chart issue unrelated to .NET 10.
    • On .NET 10, grids/data-grid/row-pinning once made no progress for 3 minutes during the full run. Run on its own, it passed 2 of 2 times on each version, in about 4 s.
  • Other builds:

    • net10.0-desktop builds with the .NET 10 CLI and with Visual Studio 2022 17.14's MSBuild.
    • Three standalone samples (category chart, data grid, geo map) build for net10.0-browserwasm and net10.0-desktop.
    • CI helpers: SampleLinks and the source-viewer self-test pass.

Platforms on .NET 10

Temporary draft #22 (this PR combined with an earlier version of #20, since closed) ran that PR build on .NET 10:

Not tested

  • iOS and Android at run time: the platforms above were built, not run on devices or emulators.
  • nginx, CloudFront and staging with the .NET 10 build.

Not in this PR

  • Uno 7: Uno.WinUI 7.0 is stable, but Uno 7 drops net9 assets and says 6.x-built libraries are binary-incompatible. The Infragistics packages are built with Uno 6.5.
  • .NET 11: Uno 6 supports up to .NET 10.

🤖 Generated with Claude Code

.NET 9 support ended on 2026-11-10. global.json now pins the 10.0.1xx SDK band
(10.0.100, latestPatch), which Visual Studio 2022 17.14 can still load, and every
project targets net10.0: the samples browser, the 331 standalone samples, the
sample template and the two CI helper tools. The HintPaths to the dev-tools
build output keep net9.0, the libraries' own framework.

On net10.0-desktop, Uno 6.7 adds the WebView2Aot package, whose WebView2 namespace
hid the WebView2 control in SampleHostPage; the type is now fully qualified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
turbobobbytraykov and others added 2 commits November 11, 2026 08:50
The retiring service worker, the Open Sans subset and the gzip removal were
conditioned on net9.0-browserwasm, so .NET 10 would have skipped them (and their
CI checks would have failed the build). Their comments now name the .NET 10
bootstrapper and SDK too: both still write service-worker.js and .gz copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up: the sample instructions named only Visual Studio 2026, while the requirements say Visual Studio 2022 17.14 also builds the projects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
global.json takes vnext's version, which names only the Uno.Sdk. Both
workflows install the newest .NET 10 SDK (setup-dotnet 10.0.x) instead of
reading an SDK from global.json, and the deploy's step that pinned 9.0.315
for CI runs is gone. Visual Studio 2022 17.14 uses the newest SDK it can
load, so it builds the net10.0 targets when a 10.0.1xx SDK is installed;
the README says so.

DropGzipCopies takes vnext's version from #19 (keep the dotnet.native.wasm
gzip copy) and runs for net10.0-browserwasm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gmurray81

Copy link
Copy Markdown
Member

I merged vnext into this branch (821592d) so it merges cleanly again, and took the SDK pin out. Since #23, vnext's global.json names only the Uno.Sdk, and this branch now matches it: nothing pins the .NET SDK, locally or in CI.

  • global.json: vnext's version, with no sdk section, instead of 10.0.100 + latestPatch. Builds use the newest SDK installed.
  • Workflows: build-and-deploy.yml and pr-build.yml install the newest .NET 10 SDK (setup-dotnet with dotnet-version: 10.0.x) instead of reading global.json. The deploy step from Don't pin the .NET SDK #23 that wrote a 9.0.315 pin into global.json for CI runs is gone.
  • Visual Studio 2022 17.14: with nothing pinned, it uses the newest SDK it can load. On a machine with 9.0.313 and 10.0.401, its MSBuild resolved 9.0.313. So it builds the net10.0 targets once a 10.0.1xx SDK is installed. The README says that now, in place of the pinned-band wording.
  • DropGzipCopies conflict: took Keep the gzip copy of dotnet.native.wasm #19's version (keep the dotnet.native.wasm gzip copy) and its condition is now net10.0-browserwasm.

Checked:

  • The PR build passes on this branch: checks, desktop, android, ios and browserwasm.
  • On a local SDK 10.0.401, with nothing pinned:
    • SampleLinks and the source-viewer self-test pass.
    • The desktop head builds.
    • The deploy's AOT publish succeeds. index.html and web.config are there, and dotnet.native.<hash>.wasm.gz is the only .gz left.

The "global.json" and "Team setup" parts of the description above still describe the 10.0.1xx pin.

🤖 Generated with Claude Code

@gmurray81
gmurray81 merged commit 5486221 into vnext Nov 11, 2026
6 checks passed
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