Skip to content

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

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

Fixes

Aligns all modern .NET projects in this repo on net10.0 (drops net8.0/net9.0), following CommunityToolkit/Tooling-Windows-Submodule#327, and cleans up what that makes unnecessary.

PR Type

  • Build or CI related changes
  • Refactoring (no functional changes, no api changes)

What is the current behavior?

Tooling targets net8.0/net9.0; the sample index tools target net9.0, CI references bin/Release/net8.0, and there is an internal ThrowIfNull shim and an explicit SourceLink reference.

What is the new behavior?

  • tooling submodule points at the PR ListViewExtensions.AlternateColor only gets applied on hover #327 branch head (2236c15). Temporary: must be re-pointed to tooling main once that merges.
  • tools/SampleIndexExporter(.Tests) target net10.0; CI generator test path is bin/Release/net10.0; DOTNET_VERSION is 10.0.402; the DOTNET_ROLL_FORWARD note is removed.
  • Removed the internal default(ArgumentNullException).ThrowIfNull helper in favor of the in-box ArgumentNullException.ThrowIfNull (and Animations' no longer needed InternalsVisibleTo).
  • Removed the redundant explicit Microsoft.SourceLink.GitHub reference (SourceLink mappings and nuspec repository commit verified identical when packing Extensions).
  • CI requires MSBuild from Visual Studio 2026 (vs-version [18.0,)); devcontainer moved to the .NET 10 image (untested); ReadMe prerequisites refreshed.

Validated locally: full wasdk and uwp (WinUI 2) Release builds, wasdk tests (389 passed, 3 skipped), SampleGen tests, sample index check + tests, wasm library Release build and wasm head Debug build. Not validated locally: android/ios/macos/wpf/linuxgtk legs, Release wasm head, devcontainer.

PR Checklist

  • Created a feature/dev branch
  • Based off latest main branch of toolkit
  • Tested code with current supported SDKs
  • Contains NO breaking changes

Other information

Breaking for consumers: published packages no longer target net8.0/net9.0 TFMs (NU1202 on restore for those consumers); consider bumping MinorVersion.

@Sergio0694
Sergio0694 marked this pull request as ready for review December 4, 2026 17:52
Sergio0694 and others added 6 commits December 4, 2026 11:47
Points tooling at CommunityToolkit/Tooling-Windows-Submodule main (c001882), which includes #327.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Retarget the sample index exporter and its tests to net10.0.
- Update the generator test path in CI (bin/Release/net10.0) and the SDK used by jobs that cannot read global.json.
- Update docs that referenced the .NET 9 SDK and the DOTNET_ROLL_FORWARD workaround, no longer needed now that the exporter targets the SDK's major version.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove the internal default(ArgumentNullException).ThrowIfNull helper, which existed to provide CallerArgumentExpression-based null checks on older targets. Everything now targets net10.0, so the BCL API can be used directly. Animations no longer needs Extensions' internals, so drop its InternalsVisibleTo (Media still uses the shared resource helpers).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
SourceLink for GitHub is bundled in the .NET SDK (since .NET 8), so the explicit Release-only PackageReference is redundant. Verified that the packed Extensions assembly still gets the same SourceLink document mappings and the nuspec the same repository commit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Require MSBuild from Visual Studio 2026 (18.x) in CI: net10.0 targets are not supported by Visual Studio 2022 (NETSDK1233 is an error with warnings as errors).
- Move the devcontainer to the .NET 10 image (global.json requires the 10.0 SDK). Not tested, no Docker available.
- Refresh ReadMe prerequisites (Visual Studio 2026, .NET 10 SDK, Windows SDK 26100) and drop the 'ReadMe is out of date' note from the validation skill.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…Catalyst

The net10 iOS/Mac Catalyst SDKs always enable the trim analyzer (Xamarin.Shared.Sdk.Trimming.props), including for class libraries. Uno-generated XAML code for samples using Microsoft.Xaml.Interactivity behaviors/actions (RequiresUnreferencedCode) then raises IL2026, which is an error in Release. This is the same suppression tooling's Uno heads already use. Remove once Uno fixes the generated code.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Sergio0694
Sergio0694 force-pushed the sergio0694-align-on-net10 branch from 0899da1 to 4455c54 Compare December 4, 2026 19:48
@Sergio0694
Sergio0694 merged commit 37cc941 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