Skip to content

Add CsWinRT 3 (.1 Windows TFM) assets for CommunityToolkit Labs components #826

Open

Description

@hoshiizumiya

Describe the bug

The issue is written with AI. It may have a mistake

During an experimental migration from CsWinRT 2 to CsWinRT 3, several CommunityToolkit Labs packages either fail restore or resolve to the wrong platform-specific implementation.

The two observed failure modes are:

  • Shimmer and TransitionHelper: NuGet restore reports NU1202 for the tested package versions.
  • DataTable and TokenView: Restore succeeds but selects generic lib/net9.0 Uno assemblies referencing Uno.UI, rather than Windows App SDK-specific assets.

This is not a reported runtime failure in the existing application. Its current configuration continues to use CsWinRT 2.3.1. These results were observed while experimenting with CsWinRT 3 and Windows .1 TFMs.

This issue is limited to components owned by CommunityToolkit/Labs-Windows. Corresponding packages owned by CommunityToolkit/Windows are tracked separately in:

CommunityToolkit/Windows#890

Environment

Property Value
.NET SDK 11.0.100-rc.3.26522.148
Target framework net10.0-windows10.0.26100.1
Windows SDK projection 10.0.26100.88-preview
CsWinRT 3.0.0-preview.261104.1
Platform Windows App SDK / WinUI 3

Package sources:

Affected Labs packages

The following are the exact versions currently pinned in the consuming application's project file:

Package Baseline version Reported .1 symptom
CommunityToolkit.Labs.WinUI.Shimmer 0.1.250828-build.2223 NU1202
CommunityToolkit.Labs.WinUI.TransitionHelper 0.1.260915-build.2673 NU1202
CommunityToolkit.Labs.WinUI.Controls.DataTable 0.1.260915-build.2673 Selects lib/net9.0 Uno assets
CommunityToolkit.Labs.WinUI.TokenView 0.1.250828-build.2223 Selects lib/net9.0 Uno assets

Evidence limitation: The versions above are verified PackageReference versions from the existing project, while the .1 symptoms come from separate upgrade experiments. They should not be described as independently confirmed exact test-version matches until the individual .1 restore logs or package asset lists are attached.

The reported DataTable and TokenView resolution paths contain lib/net9.0 assemblies referencing Uno.UI.

These results must not be interpreted as successful WinAppSDK support merely because restore completes.

Steps to reproduce

Create Repro.csproj:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net10.0-windows10.0.26100.1</TargetFramework>
    <WindowsSdkPackageVersion>10.0.26100.88-preview</WindowsSdkPackageVersion>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Windows.CsWinRT" Version="3.0.0-preview.261104.1" />
    <PackageReference Include="CommunityToolkit.Labs.WinUI.Shimmer" Version="0.1.250828-build.2223" />
  </ItemGroup>
</Project>

Restore with the relevant package sources:

dotnet restore Repro.csproj --force --no-cache `
  --source "https://api.nuget.org/v3/index.json" `
  --source "https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json" `
  --source "https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-MainLatest/nuget/v3/index.json"

Reported actual behavior: Shimmer fails with NU1202 in the .1 migration experiment.

Repeat with a single package reference to TransitionHelper.

For DataTable and TokenView, test each package separately and inspect:

obj/project.assets.json

Specifically check the selected compile and runtime assets and references to Uno libraries.

The reported successful restores selected lib/net9.0 Uno assemblies referencing Uno.UI, rather than a compatible Windows .1 assembly.

Root technical issue

The shared CommunityToolkit multi-targeting infrastructure currently provides Windows App SDK target frameworks using the .0 Windows TFM revision.

CsWinRT 3 introduces the .1 Windows TFM revision as an opt-in for the new projection generation:

NuGet/Home#14859

The shared build tooling therefore needs a Windows .1 lane rather than relying on the old .0 assets or on generic .NET assets built for Uno.

Labs also references packages from the main CommunityToolkit repository. For example, DataTable's dependency configuration includes CommunityToolkit WinUI Converters, Extensions, and Sizers.

These dependencies must be available in a matching CsWinRT 3 generation as well. Updating a Labs component without checking its referenced Windows component packages would leave an inconsistent dependency graph.

There are three separate questions:

  1. Does the current source build for a .1 TFM?
  2. Can newly compiled .1 artifacts be packaged correctly?
  3. Do the actually published NuGet packages contain compatible .1 compile/runtime assets and dependencies?

Passing one of these checks does not establish the others.

Expected behavior

Please provide genuine CsWinRT 3-compatible Windows .1 assets for the affected Labs components.

Requested work:

  1. Update the shared Windows multi-targeting configuration to include net10.0-windows10.0.26100.1, while preserving the existing .0 builds.
  2. Use a matching CsWinRT 3 and Windows SDK projection configuration for the new build lane.
  3. Rebuild Labs components against the correct Windows App SDK projection, not the Uno-specific implementation.
  4. Ensure dependent Windows CommunityToolkit components, including Converters, Extensions, and Sizers where applicable, are available in the same projection generation.
  5. Publish correct lib/net10.0-windows10.0.26100.1/ assemblies and dependency groups without replacing the existing .0 assets.
  6. Validate package restore, compile/runtime asset selection, actual WinUI consumption, and Native AOT publishing where applicable.

The existing CsWinRT 2 consumers must continue to receive their .0 assets.

Pure C# controls should not be required to generate WinMD files just to support CsWinRT 3. Correctly compiling their managed assemblies against the new projection is the relevant requirement unless a component explicitly exposes a WinRT ABI.

Acceptance criteria

  • The tested Labs packages restore into a Windows .1 consumer using their Windows-specific assets.
  • No incompatible Uno implementation is selected as a substitute.
  • The transitive dependency graph uses a consistent WinRT projection generation.
  • Existing Windows .0 assets remain available.
  • Actual WinUI usage and applicable Native AOT tests pass.
  • These checks are performed against newly published package artifacts, not only against repository source.

This issue concerns the Labs packages and their published assets; it is not evidence of a production Native AOT runtime failure.

Screenshots

No response

Code Platform

  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

26100

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

Preview

Visual Studio Build Number

Insiders [12328.396]

Device form factor

Desktop

Additional context

No response

Help us help you

No, I'm unable to contribute a solution.

Activity

  1. added
    bug 🐛
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions