Skip to content

Align all modern .NET projects on .NET 10 - #836

Merged
Sergio0694 merged 6 commits into
mainfrom
sergio0694-align-on-net10
Dec 4, 2026
Merged

Sergio0694 merged 6 commits into
mainfrom
sergio0694-align-on-net10

Conversation

@Sergio0694

Copy link
Copy Markdown
Member

Aligns every modern .NET project in Labs on net10.0 only (dropping net8.0/net9.0) and cleans up what that makes unnecessary. Companion to CommunityToolkit/Tooling-Windows-Submodule#327.

Changes

  • Tooling submodule now points at the head of the tooling PR branch sergio0694-align-on-net10 (2236c15d). This must be re-pointed to tooling main once that PR merges, before merging this one.
  • TFMs: UwpTargetFrameworks in AppServices, Notifications and DependencyPropertyGenerator is now net10.0-windows10.0.17763.0;. The DependencyPropertyGenerator tests moved to net10.0 and to Basic.Reference.Assemblies.Net100 / ReferenceAssemblies.Net.Net100 (required: with Net80 refs all tests fail with CS1705), with Microsoft.CodeAnalysis.CSharp.{Analyzer,CodeFix}.Testing bumped to 1.1.3.
  • Cleanups: removed the TransitionHelper IsExternalInit polyfill, LangVersion=preview from the Adorners library (the field keyword is stable in C# 14; the samples keep it for Mvvm partial properties), and the NU1903 suppression in the DPG tests.
  • Docs/CI: ReadMe requires .NET 10 SDK and VS 2026; build.yml vs-version is [18.0,); Copilot instructions refreshed.
  • netstandard2.0 projects (source generators/analyzers), the net472 AppServices generator tests, and the #if NET8_0_OR_GREATER branches in the DPG generator's emitted consumer source are intentionally untouched.

Validation (Release, SDK 10.0.404, VS 18)

  • uwp and wasdk legs build with 0 errors and no NU1510; wasdk component tests 96/96.
  • DPG tests 912/912 on net10.0 (same as main); AppServices net472 generator tests 33/33.
  • Packs of AppServices, Notifications, DPG (uwp and wasdk), Extensions.DependencyInjection and Adorners contain only net10.0* lib folders (plus netstandard2.0 for AppServices).
  • Not validated locally: wasm, android, ios, maccatalyst legs (workloads unavailable for the pinned SDK) — relying on CI.

Notes

  • Breaking for consumers: net8.0/net9.0 apps can no longer use the Labs packages' Windows assets.
  • DPG consumer docs/error text still mention the .NET 9 SDK / VS 17.12 as the Roslyn 4.12 compiler floor, which remains accurate.

@Sergio0694
Sergio0694 marked this pull request as ready for review December 4, 2026 17:52
@Sergio0694
Sergio0694 force-pushed the sergio0694-align-on-net10 branch from 03886cc to bb06265 Compare December 4, 2026 19:14
Sergio0694 and others added 6 commits December 4, 2026 11:48
Points tooling at CommunityToolkit/Tooling-Windows-Submodule#327, which is
merged on tooling main (c0018820).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- AppServices, Notifications and DependencyPropertyGenerator now override
  UwpTargetFrameworks with net10.0-windows10.0.17763.0 only (dropping
  net8.0/net9.0), matching the tooling .NET 10 alignment.
- The DependencyPropertyGenerator tests now target
  net10.0-windows10.0.17763.0. Their compilations reference the net10 package
  assembly, so they must use net10 reference assemblies (otherwise CS1705):
  move to Basic.Reference.Assemblies.Net100 and ReferenceAssemblies.Net.Net100,
  which requires Microsoft.CodeAnalysis.CSharp.{Analyzer,CodeFix}.Testing 1.1.3.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Delete the TransitionHelper IsExternalInit polyfill: its targets (uwp and
  wasdk) are net10.0 only now, where the type ships in the BCL.
- Drop LangVersion=preview from the Adorners library: it was only needed for
  the 'field' keyword, which is stable in C# 14 (the default for net10.0). The
  samples keep it, as they use CommunityToolkit.Mvvm partial properties.
- Drop the NU1903 suppression from the DependencyPropertyGenerator tests: the
  vulnerable transitive packages are no longer restored with the updated
  Roslyn testing packages and net10.0 package pruning.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- ReadMe: require the .NET 10 SDK (matching global.json) and Visual Studio 2026
  (18.0), which the .NET 10 SDK requires.
- build.yml: require VS 18.0+ for setup-msbuild instead of 17.13.
- Copilot instructions: refresh the UwpTargetFrameworks and IsAotCompatible
  notes for net10.0.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ObservableValidator and DataAnnotations validation rely on reflection, and
the Apple SDKs always run the trim analyzer (with the default SdkOnly link
mode they don't suppress its warnings), so the net10.0-ios/net10.0-maccatalyst
Release builds failed with IL2026 errors in the sample.

Annotate the sample ViewModel with [RequiresUnreferencedCode] so the
requirement is expressed correctly, and only suppress IL2026 where the page
instantiates it, scoped to the Apple TFMs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Uno.Wasm.Bootstrap 10 errors (UNOWA0001) when native wasm assets are
used without the wasm-tools workload. SkiaSharp.NativeAssets.WebAssembly
(via RivePlayer) turns on native linking, and this compile-only job
doesn't install the workload. Skip the check there: the Windows wasm leg
covers the full native build.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Sergio0694
Sergio0694 force-pushed the sergio0694-align-on-net10 branch from bb06265 to 9552146 Compare December 4, 2026 19:48
@Sergio0694
Sergio0694 merged commit f567943 into main Dec 4, 2026
16 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.

1 participant