Repository navigation
Split NuGet packages per UI framework (Uwp, WinUI, Uno) - #328
Merged
Merged
Conversation
Each UI framework now has its own set of packages, so a package never mixes TFMs from different frameworks: Uwp (uwp), WinUI (wasdk) and Uno (wasm, wpf, linuxgtk, macos, ios, android). - EnabledTargetFrameworks.props computes a per-MultiTarget "active" flag (enabled and available) once, and derives both TargetFrameworks and the per-framework flags from it, so they can't drift apart. - The shared net10.0 TFM of wasm/wpf/linuxgtk is now added when one of them is both enabled and available, like every other MultiTarget. It used to be added when any of them was enabled and any was available, which built an unrequested net10.0 (and could flip the package to Uno, or trip the pack guard) when e.g. wpf was enabled for a component that only declares wasm. The TFM's content still covers every available one (IsWasm/IsWpf/IsGtk are unchanged). - PackageIdVariant is derived from those flags and can now be Uno. - EnsureSingleUIFrameworkPackage fails packing when the active MultiTargets span more than one UI framework. - Remove the empty lib/net10.0-windows10.0.18362 placeholder workaround and its EnableXamlCompilerMismatchedTfmUnoWorkaround property, no longer needed. - The Uno heads keep depending on the WinUI previews until CommunityToolkit.Uno.* packages are published. - Remove the unused Scripts/PackEachExperiment.ps1, which ran a raw pack of every component with the default enabled MultiTargets and now fails by design. Use Build-Toolkit-Components.ps1 -NupkgOutput -UIFramework instead. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve-MultiTargets.ps1, Build-Toolkit-Components.ps1 and Filter-Supported-Components.ps1 take -UIFramework none|uwp|winui|uno, which selects the MultiTargets of one UI framework (plus netstandard for uwp and winui) and implies the WinUI major version. Resolve-MultiTargets.ps1 now maps frameworks, WinUI versions and MultiTargets from a single table, reports the UI frameworks the resolved MultiTargets span, and resolves WinUI 0 to netstandard only. A netstandard-only request with WinUI 3 is now refused, like it already was with WinUI 2. Build-Toolkit-Components.ps1 defaults -MultiTargets to all when -UIFramework is given, and refuses to pack MultiTargets of more than one UI framework, so each package set is packed in its own run. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add a `package` job that packs a component from the template once per UI framework (uwp, winui, uno), one after the other in the same workspace, and verifies the package id, that `lib/` only holds the TFM folder of that framework with no empty placeholders, and the framework specific dependency (the Uwp and WinUI packages share their lib folder). It also checks that both Build-Toolkit-Components.ps1 and MSBuild refuse to pack WinUI and Uno together. The Uno leg packs the net10.0 targets, as the mobile ones need workloads. The CI config now sets PackageIdPrefix, as packing fails for ids with an empty prefix. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Update the repo and MultiTarget instructions, the MultiTarget ReadMe and the consumer-layout validation skill for the Uwp/WinUI/Uno package split, -UIFramework and where netstandard ends up. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Remove the Windows SDK installer step from the new-experiment and package jobs, and delete Install-WindowsSdk.ps1. It installed a Windows 10 SDK from the old uap10.0 / MSBuild.Sdk.Extras era (about 90-100s per leg), while the TFMs are net10.0-windows10.0.26100.0 with SDK projections from NuGet. The windows-2025 image already has the 26100 SDK and the UWP workloads, the project-template job has built the wasm and wasdk heads without it since 6c8f3e3, and the Windows and Labs-Windows CI build and test uwp and wasdk without ever installing it. - Only set up VSTest in the new-experiment legs that run tests (uwp, wasdk). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Run `dotnet --info` from the checkout, where global.json is. It ran from the workspace root before global.json was copied there, so it reported the newest installed SDK (11.0.100, "global.json file: Not found") instead of the 10.0.4xx one the job actually builds with. - Define PROJECT_DIRECTORY in the wasm-linux job. It was undefined there, so `dotnet new --install ./` ran from the workspace root and installed the whole repository as a template package (both ctk-component and ct-tooling-heads), instead of only tooling/ProjectTemplate like the other jobs do. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The package job had two large inline scripts, unlike the rest of the workflows, which invoke scripts. Replace them with: - Test-Toolkit-Package.ps1: verifies a packed .nupkg (exact id, exact lib folders, no empty placeholders, expected dependencies). It also works on any local package. - Test-Toolkit-Pack-Refusal.ps1: checks that packing more than one UI framework is refused, by Build-Toolkit-Components.ps1 and by the EnsureSingleUIFrameworkPackage MSBuild target. The workflow now has flat, explicit steps per UI framework (pack, then verify), still sequential in one workspace on purpose, as the Uwp and WinUI packages build the same TFM. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Dec 4, 2026
The mobile Uno TFMs are packed in lib folders that carry the platform version (net10.0-android36.0, net10.0-ios26.0, net10.0-maccatalyst26.0), as seen packing Labs-Windows in CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sergio0694
added a commit
to CommunityToolkit/Windows
that referenced
this pull request
Dec 5, 2026
Bump tooling to the commit of CommunityToolkit/Tooling-Windows-Submodule#328, which gives each UI framework its own set of packages. - Pack once per UI framework (uwp, winui, uno) in the package, sign and release jobs - Only run uno-check for the mobile Uno build legs and the Uno package leg - Run the SourceGenerators tests in a single build leg - Tag the Uno packages as Uno, and not as Windows App SDK/UWP ones - Update the docs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sergio0694
added a commit
to CommunityToolkit/Windows
that referenced
this pull request
Dec 5, 2026
* Update tooling to the per-UI-framework packages of Tooling-Windows-Submodule#328 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Split NuGet packages per UI framework (Uwp, WinUI, Uno) Bump tooling to the commit of CommunityToolkit/Tooling-Windows-Submodule#328, which gives each UI framework its own set of packages. - Pack once per UI framework (uwp, winui, uno) in the package, sign and release jobs - Only run uno-check for the mobile Uno build legs and the Uno package leg - Run the SourceGenerators tests in a single build leg - Tag the Uno packages as Uno, and not as Windows App SDK/UWP ones - Update the docs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Point Uno users to the Uno packages in the package readmes Every package ships its component's ReadMe.md, which told Uno.WinUI users to use the WinUI package. The components that only support UWP and Windows App SDK drop the Uno mention. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
3 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each UI framework now has its own set of NuGet packages, so a package never mixes TFMs from different frameworks:
libfoldersCommunityToolkit.Uwp.*uwpnet10.0-windows10.0.26100CommunityToolkit.WinUI.*wasdk(+netstandard)net10.0-windows10.0.26100CommunityToolkit.Uno.*wasm,wpf,linuxgtk,macos,ios,androidnet10.0, plus the mobile ones with the platform version in the folder name (e.g.net10.0-android36.0,net10.0-ios26.0,net10.0-maccatalyst26.0)This removes the empty
lib/net10.0-windows10.0.18362placeholder workaround (CommunityToolkit/Windows#388) and theEnableXamlCompilerMismatchedTfmUnoWorkaroundproperty, which only existed because Uno and WinUI assets were mixed in one package.What changed
PackageIdVariantis nowUwp,WinUIorUno, derived from the active MultiTargets (enabled and available).EnabledTargetFrameworks.propscomputes a per-MultiTarget active flag once and derives bothTargetFrameworksand the variant from it, so they can't drift. A newEnsureSingleUIFrameworkPackagetarget fails packing when the active MultiTargets span more than one UI framework.net10.0TFM. It is now added when one ofwasm/wpf/linuxgtkis both enabled and available, like every other MultiTarget. It used to be added when any of them was enabled and any was available, which built an unrequestednet10.0(and could flip the package to Uno or trip the guard) e.g. whenwpfwas enabled for a component declaring onlywasm. The TFM's content is unchanged (IsWasm/IsWpf/IsGtkstill follow the available targets).-UIFramework none|uwp|winui|unoonResolve-MultiTargets.ps1,Build-Toolkit-Components.ps1andFilter-Supported-Components.ps1selects the MultiTargets of one framework (plusnetstandardforuwp/winui) and implies the WinUI major version.Build-Toolkit-Components.ps1defaults-MultiTargetstoallwhen-UIFrameworkis given, and refuses to pack MultiTargets of more than one UI framework. Resolution is now table-driven.packagejob packs a component from the template once per framework (sequentially, in one workspace) and verifies the package id, the exactlib/TFM folders, no empty placeholders, and the framework-specific dependency (Uwp and WinUI share their lib folder). It also checks that both the script and MSBuild refuse mixed packs. CI config now setsPackageIdPrefix(an empty prefix makes an invalid id).Install Windows SDKsstep (about 90-100s per leg) andInstall-WindowsSdk.ps1: it installed an old Windows 10 SDK from theuap10.0era, the TFMs arenet10.0-windows10.0.26100.0with SDK projections from NuGet, and the other jobs/consumers build and test uwp/wasdk without it.setup-vstestonly runs where tests run. Fixed.NET Inforeporting the wrong SDK andwasm-linuxinstalling the whole workspace as a template.Scripts/PackEachExperiment.ps1(raw pack with the default enabled set, which now fails by design). Docs, instructions and the validation skill are updated.Behavior changes to know about
Build-Toolkit-Components.ps1 -MultiTargets all -WinUIMajorVersion 3 -NupkgOutput ...now throws (it spans WinUI and Uno). Consumers must pack per framework with-UIFramework. Non-packing flows with-WinUIMajorVersion 3are unchanged.-WinUIMajorVersion 0now resolves tonetstandardonly, and anetstandard-only request with WinUI 3 is refused (like WinUI 2 already was).CommunityToolkit.WinUI.*8.3.260402-preview2 packages (noCommunityToolkit.Uno.*package exists on any feed yet). Once a preview with the Uno packages is published, bump the version inProjectHeads/App.Head.propsand setDependencyVarianttoUnoinProjectHeads/App.Head.Uno.props.net10.0-windows10.*TFM) must referenceCommunityToolkit.Uno.*only for the Uno TFMs andCommunityToolkit.WinUI.*for the Windows one (documented inMultiTarget/ReadMe.md).Consumer follow-ups (must land with the submodule bump)
winui: [2, 3](Labs[0, 2, 3]) ->ui: [uwp, winui, uno](Labs alsonone), pack with-UIFramework ${{ matrix.ui }}, key artifact names onmatrix.ui.Restore dotnet tools,Remove .NET SDKs newer than global.jsonanduno-checkonly for theunopack leg, with--target android --target ios --target macos; in the build job only for the macos/ios/android legs.Directory.Build.targets: apply theUnotag whenPackageIdVariant == 'Uno'(currently'WinUI').<EnableXamlCompilerMismatchedTfmUnoWorkaround>false</...>lines in components.Validation
Done in a CI-like layout (template component): the three framework packs (Uwp/WinUI/Uno
lib/and nuspec dependencies), the pack refusals (script and MSBuild), the shared-TFM matrix before/after, and the wasm/uwp/wasdk sample-head builds. Not validated here: macos/ios/android packing (workloads) and the newpackageCI job on real runners.