Skip to content

feat(sdk)!: Resolve platform targeting from the target framework - #24087

Closed
MartinZikmund wants to merge 18 commits into
feature/breakingchangesfrom
dev/mazi/referencebuild
Closed

MartinZikmund wants to merge 18 commits into
feature/breakingchangesfrom
dev/mazi/referencebuild

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: part of #8339

PR Type:

💥 Breaking change (build / platform targeting)

What changed? 🚀

The platform axis now follows the target framework, for class libraries and application heads alike. Previously it was derived from the internal runtime identifiers, which produced three separate defects:

Before After
android: / ios: / wasm: XAML prefixes never resolved on the platform they name — XamarinProjectType was overwritten with skia on every mobile and WebAssembly target resolve from the target framework
tvos: / desktop: XAML prefixes did not exist added
*.skia.cs, *.crossruntime.cs gated on UnoRuntimeIdentifier, which only netX.0-desktop sets — so both were silently an alias of *.desktop.cs every target framework except the WinAppSDK one
__DESKTOP__ defined only by the desktop runtime packages, which the SDK references for executable heads only any net*-desktop project
__WASM__ required the WebAssembly runtime package any net*-browserwasm project
A multi-targeted package's lib/<tfm>-ios|android|tvos asset silently replaced by its lib/<tfm> asset, for both compile and runtime kept

The runtime identifiers (UnoRuntimeIdentifier, UnoUIRuntimeIdentifier, UnoWinRTRuntimeIdentifier) are deliberately untouched — they still drive the Uno.WinRT / Uno.Foundation two-layer runtime asset selection, and setting UnoRuntimeIdentifier on mobile would switch that machinery out of two-layer mode.

Asset selection. RuntimeAssetsSelectorTask.HandleSkiaMobileForNonRuntimeEnabledPackages is removed. It existed because Uno.WinUI used to ship a native Uno.UI under lib/<tfm>-ios|android, which made a library's platform asset incompatible with a Skia head. Uno.WinUI now ships no platform-specific lib/ folder at all, so every asset binds the same Uno.UI and the substitution has nothing left to correct.

Because a package built against an earlier Uno.UI is now deployed rather than quietly swapped out, RuntimeAssetsValidatorTask reports the new UNOB0020 when a kept platform asset references Uno.UI types that no longer exist. It is opt-out through UnoDisableUNOB0020Validation and documented in uno-build-error-codes.md.

While in that task, its UnoUIRuntimeIdentifier lookup now matches on the metadata key rather than on whichever AssemblyMetadata attribute came first — the SDK emits its own (RepositoryUrl, IsTrimmable) ahead of Uno's, which made the check a no-op for most published packages.

Cleanup. Ten files under src/Uno.UI wrapped end to end in a guard that can no longer be true, plus the orphan LottieVisualSource.reference.cs, are deleted (1378 lines).

Tests. First coverage for the Uno.UI.Tasks MSBuild tasks: 19 tests driving them in-process against Cecil-authored NuGet-cache fixtures, including the Uno.WinRT two-layer swap that a plain netX.0 library depends on, which had none.

Specs. Three follow-up proposals are included as design artifacts only — they change no code:

  • specs/056-platform-targeting-vocabulary/spec.md — which prefixes, suffixes and symbols should still exist
  • specs/057-preprocessor-constant-cleanup/spec.md — the remaining constants
  • specs/058-dead-conditional-branches/spec.md — the #if branches that can no longer be taken

PR Checklist ✅

  • 🧪 Added Runtime tests, UI tests, or a manual test sample (for bug fixes / features, if applicable) — new src/SourceGenerators/Uno.UI.Tasks.Tests (19 tests), wired into Uno.UI-UnitTests-only.slnf
  • 📚 Docs have been added/updated following the documentation template (for bug fixes / features) — platform-specific-xaml.md, platform-specific-csharp.md, using-the-uno-sdk.md, using-skia-rendering.md, how-to-create-control-libraries.md, uno-build-error-codes.md, migrating-to-uno-7.md
  • 🖼️ Validated PR Screenshots Compare Test Run results — pending CI
  • ❗ Contains NO breaking changes
  • 👀 Reviewed 2 other open pull requests (optional but appreciated!)

Breaking change impact and migration

Who is affected: applications and libraries that use conditional XAML prefixes, the platform file suffixes, or that reference multi-targeted NuGet packages on an iOS/Android/tvOS head.

Impact and migration:

  1. android:, ios: and wasm: markup now applies on the matching target framework instead of being dropped, and the not_ forms no longer apply there. Markup written against the old behaviour — in particular not_android: or not_ios: used to mean "everywhere" — resolves differently. Re-test conditional XAML in multi-targeted libraries.
  2. skia: additionally applies on a plain netX.0 target framework, where it was previously false. not_skia: correspondingly stops applying there.
  3. *.skia.cs and *.crossruntime.cs now compile on every target framework except the WinAppSDK one. A file that was genuinely desktop-only should be renamed to *.desktop.cs; otherwise a Foo.skia.cs + Foo.Android.cs pair produces duplicate definitions on -android.
  4. A multi-targeted library's net*-ios / -android / -tvos assembly is now what the matching head compiles against and deploys. Recompile Uno-dependent libraries against 7.0 — a stale asset now fails at run time instead of being silently replaced, and the build reports UNOB0020 where it can detect this.

All four are covered in doc/articles/migrating-to-uno-7.md, which gains a "Platform targeting in multi-targeted libraries" section and a migration-checklist entry.

Validation

  • Uno.UI.Tasks builds clean; 19/19 new tests pass.
  • Before/after through a real MSBuild run: the -android asset is kept where it was previously rewritten to lib/net10.0, and UNOB0020 fires naming the removed type.
  • The XAML prefix and file suffix truth tables were probed across all seven target frameworks and all three runtime-identifier combinations, confirming the result no longer varies with the runtime identifiers.
  • SamplesApp builds clean for net10.0-android, net10.0-browserwasm and net10.0-desktop; Uno.UI and Uno.UI.Lottie build clean after the deletions.
  • Not validated locally: a full Uno.UI-Skia-only.slnf build (a project pins net11.0 and no .NET 11 SDK is installed on this machine), dotnet pack / Uno.PackageDiff, iOS/tvOS, and WinAppSDK.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PTBMNbcPLwzdYrtPzY8s9Z

Copilot AI lite review requested due to automatic review settings August 15, 2026 07:58
@github-actions github-actions Bot added area/code-generation Categorizes an issue or PR as relevant to code generation area/build Categorizes an issue or PR as relevant to build infrastructure area/automation Categorizes an issue or PR as relevant to project automation kind/documentation labels Aug 15, 2026
@github-actions

github-actions Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 6m 48s —— View job


Review Complete

  • Gather context and understand the PR
  • Review MSBuild/SDK targets changes
  • Review RuntimeAssetsSelectorTask and RuntimeAssetsValidatorTask changes
  • Review new test project Uno.UI.Tasks.Tests
  • Review documentation changes
  • Review deleted files for correctness
  • Post inline findings and summarize

Verdict: ship (with minor fixes)

3 inline findings — 1 low-severity correctness/readability, 2 test coverage gaps. No logic bugs found.


Cross-cutting observations

Architecture — correct direction.
Deriving the platform axis from the target framework (TFM) rather than from runtime identifiers is the right long-term model. The XamarinProjectType string was a single overwritten property that lost information as soon as the Skia RID set it to "skia" on Android/iOS/WASM heads, which is exactly what produced the three defects described in the PR table. The new property-per-platform approach (_IsAndroid, _IsIOS, _IsBrowserWasm, …) is both cleaner and directly auditable.

RuntimeAssetsSelectorTask removal of HandleSkiaMobileForNonRuntimeEnabledPackages — justified.
The deleted method existed to swap lib/<tfm>-android|ios|tvos assets back to lib/<tfm> because the old Uno.WinUI package shipped a native Uno.UI under lib/<tfm>-ios|android. Removing that native lib/ tier from the package makes the substitution superfluous. The new RuntimeAssetsValidatorTask UNOB0020 warning catches any stale platform assets from older package versions that still reference removed types, so users building against pre-7.0 packages get an actionable warning rather than a silent silent-swap-then-crash.

GetAssemblyMetadata fix — correct and well-tested.
The old code matched on FirstOrDefault(a => ...) over all AssemblyMetadataAttributes and checked only the first match, making it a no-op whenever the SDK emitted RepositoryUrl or IsTrimmable before Uno's own stamp. The new key-matching loop is correct; When_Stamp_Follows_Other_AssemblyMetadata_Then_It_Is_Still_Read directly exercises the regression path.

_unoUITypeCache static dictionary — intentional and safe.
The cache key includes (path, lastWriteTime) so it invalidates when Uno.UI changes. Sharing the type table across all projects compiled by the same MSBuild node process is a worthwhile optimization for large solutions that have many mobile heads; the comment explaining this is adequate.

Deleted files — verified rationale.
Layouter.cs (831 lines), NativeListViewBase.cs, ListViewBaseScrollContentPresenter.cs, and the other 7 files were native-rendering implementations that were already guarded by conditions the PR makes permanently false. With *.skia.cs now covering every non-WinAppSdk TFM, a Foo.skia.cs that previously compiled only under the Skia RID now compiles under all Skia targets — making files that defined the same symbols via #if !SKIA guards into duplicate definitions. Deleting the dead side is correct.

*.reference.cs still uses UnoRuntimeIdentifier — intentional.
The reference build (UnoRuntimeIdentifier=Reference) is a special meta-mode (not a real TFM), so it cannot follow TFM-based targeting. This is correctly left unchanged.

Documentation — thorough.
Seven doc files updated, migration checklist entries added, UNOB0020 documented in the error-codes reference. The three new spec files are clearly marked as design artifacts only.

Validation gap (acknowledged by author): iOS/tvOS and WinAppSDK heads were not validated locally due to missing .NET 11 SDK. CI screenshots pending. These are standard pre-merge gates.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes Uno Platform’s platform-targeting model so platform/XAML prefix/file-suffix resolution follows the target framework (TFM) rather than internal runtime identifiers. It also removes now-dead legacy UI-layer files, updates SDK/source-generator build logic, adds first automated tests for Uno.UI.Tasks, and documents the migration and new diagnostic UNOB0020.

Changes:

  • Make Uno.Sdk cross-targeting and source generator conditional XAML namespace inclusion/exclusion TFM-driven (including new desktop:/tvos: behavior and revised skia/netstdref semantics).
  • Remove the non-runtime-enabled package rewrite logic from RuntimeAssetsSelectorTask and add UNOB0020 validation via RuntimeAssetsValidatorTask.
  • Add a new Uno.UI.Tasks.Tests MSTest project and wire it into solution filters/CI scope; update docs/specs for the breaking change.

Reviewed changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Uno.UI/UI/Xaml/ILayouterElement.cs Deleted dead conditional layout helper code.
src/Uno.UI/UI/Xaml/Controls/TimePicker/TimePicker.native.cs Deleted Uno-only DP now made unreachable by new targeting rules.
src/Uno.UI/UI/Xaml/Controls/TextBox/TextBoxView.stub.cs Removed obsolete unit-test/reference stub.
src/Uno.UI/UI/Xaml/Controls/Primitives/CarouselPanel.cs Removed unused panel type guarded by dead conditions.
src/Uno.UI/UI/Xaml/Controls/ListViewBase/NativeListViewBase.cs Removed native-renderer bridging type no longer reachable.
src/Uno.UI/UI/Xaml/Controls/ListViewBase/ListViewBaseScrollContentPresenter.cs Removed native scroll presenter bridge no longer reachable.
src/Uno.UI/UI/Xaml/Controls/Layouter/Layouter.cs Deleted large legacy layouter implementation behind dead guards.
src/Uno.UI/UI/Xaml/Controls/ItemsWrapGrid/ItemsWrapGridLayout.cs Removed dead ItemsWrapGrid layout implementation.
src/Uno.UI/UI/Xaml/Controls/ItemsWrapGrid/ItemsWrapGrid.cs Removed dead ItemsWrapGrid implementation behind dead guards.
src/Uno.UI/UI/Xaml/Controls/ItemsStackPanel/ItemsStackPanel.NotImplemented.cs Removed dead NotImplemented partial behind dead guards.
src/Uno.UI.slnx Added new Uno.UI.Tasks.Tests project to solution definition.
src/Uno.UI-UnitTests-only.slnf Included Uno.UI.Tasks.Tests in the unit-tests solution filter.
src/Uno.Sdk/targets/Uno.CrossTargeting.targets Make .crossruntime.cs/.skia.cs and wasm suffix handling TFM-driven; define crossruntime as “not WinAppSDK”.
src/Uno.Sdk/targets/Uno.Common.Wasm.targets Define __WASM__ based on net*-browserwasm TFMs.
src/Uno.Sdk/targets/Uno.Common.Desktop.targets Define __DESKTOP__ for any net*-desktop project (including libraries).
src/SourceGenerators/Uno.UI.Tasks/RuntimeAssetsValidator/RuntimeAssetsValidatorTask.cs Add platform-asset validation and improve UnoUIRuntimeIdentifier stamp reading; introduce UNOB0020 warning.
src/SourceGenerators/Uno.UI.Tasks/RuntimeAssetsSelector/RuntimeAssetsSelectorTask.cs Remove non-runtime-enabled package “Skia mobile” rewrite branch; keep platform assets intact.
src/SourceGenerators/Uno.UI.Tasks.Tests/Uno.UI.Tasks.Tests.csproj New MSTest project for Uno.UI.Tasks in-process task testing.
src/SourceGenerators/Uno.UI.Tasks.Tests/Given_RuntimeEnabledPackage.cs Tests two-layer runtime selection behavior for runtime-enabled packages.
src/SourceGenerators/Uno.UI.Tasks.Tests/Given_RuntimeAssetsValidatorTask.cs Tests UNOB0020 behavior and UnoUIRuntimeIdentifier stamp matching.
src/SourceGenerators/Uno.UI.Tasks.Tests/Given_RuntimeAssetsSelectorTask.cs Tests that platform-specific assets are preserved across platforms.
src/SourceGenerators/Uno.UI.Tasks.Tests/Directory.Build.targets Ensures MSBuild runtime assets are available to the test host.
src/SourceGenerators/Uno.UI.Tasks.Tests/AssemblyFixture.cs Adds Cecil-authored NuGet-cache fixtures and a recording MSBuild engine for tests.
src/SourceGenerators/Uno.UI.SourceGenerators/Content/Uno.UI.SourceGenerators.props Make conditional XAML namespace prefixes resolve from TFM; add desktop/tvos support; redefine “Uno-rendered” vs WinAppSDK.
src/SourceGenerators/Uno.UI.SourceGenerators.Tests/UnoAssemblyHelper.cs Remove reference-assembly loading paths now that Reference flavor is gone for these UI assemblies.
src/SamplesApp/SamplesApp/SamplesApp.csproj Removes outdated comment about generator ordering/runtime-identifier dependency.
src/AddIns/Uno.UI.Lottie/LottieVisualSource.reference.cs Deleted orphan reference-only implementation file.
specs/058-dead-conditional-branches/spec.md New proposal documenting dead #if branches post-targeting changes.
specs/057-preprocessor-constant-cleanup/spec.md New proposal documenting preprocessor symbol cleanup taxonomy.
specs/056-platform-targeting-vocabulary/spec.md New proposal defining future platform-targeting vocabulary post-change.
specs/051-samplesapp-unosdk-skia/plan.md Update historical note to reflect removal of the old rewrite lever.
specs/043-drop-native-rendering/spec.md Amendment documenting removal of non-runtime-enabled asset rewrite and UNOB0020.
doc/articles/uno-build-error-codes.md Document new UNOB0020 warning and suppression property.
doc/articles/platform-specific-xaml.md Update conditional XAML prefix semantics to be TFM-driven; document deprecated aliases.
doc/articles/platform-specific-csharp.md Update guidance for libraries vs heads under new asset selection model.
doc/articles/migrating-to-uno-7.md Add migration guidance for multi-targeted libraries and new targeting behavior.
doc/articles/guides/how-to-create-control-libraries.md Update library-targeting guidance under new asset selection behavior.
doc/articles/features/using-the-uno-sdk.md Update suffix table and explain new .crossruntime.cs / .skia.cs behavior.
doc/articles/features/using-skia-rendering.md Update explanation for platform-specific assets in libraries; reference UNOB0020.
build/nuget/uno.winui.runtime-replace.targets Wire RuntimeAssetsValidatorTask inputs + opt-out property; stop passing unused selector inputs.
build/ci/scripts/determine-test-scope.ps1 Expand TemplateTestsRequired scope to include Uno.UI.Tasks changes.
.claude/rules/platform-targeting.md Document scope separation: repo-internal targeting vs consumer-facing Uno.Sdk targeting.
.claude/rules/build-system.md Update build-system rule to reflect selector no longer rewrites third-party platform assets.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 227924 found UI Test snapshots differences: skia-linux-screenshots: 73, skia-windows-screenshots: 123

Details
  • skia-linux-screenshots: 73 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ContextRequested.png-dark
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • DropDownButtonPage.png-dark
    • Examples.png
    • Buttons.png
    • Image_Margin_Large.png
    • CalendarView_Theming.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Focus_FocusVisual_Properties.png-dark
    • ImageBrush_Stretch.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • ContentControl_Inheritance.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • DisplayInformation.png-dark
  • skia-windows-screenshots: 123 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • EmailManagerTests.png-dark
    • EmailManagerTests.png
    • DropDownButtonPage.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • Attributed_text_FontSize_Changing.png-dark
    • Battery.png-dark
    • Battery.png
    • ClipboardTests.png-dark
    • ExpanderColorValidationPage.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Attributed_text_FontSize_Changing.png
    • Image_UseTargetSizeLate.png-dark
    • Image_UseTargetSizeLate.png
    • DataTransferManager.png-dark
    • DataTransferManager.png
    • Examples.png
    • ImageIconPage.png-dark
    • ImageIconPage.png

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 227925 has failed on Uno.UI - docs.

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 227924 has failed on Uno.UI - CI.

@github-actions

github-actions Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 8m 11s —— View job


Review Complete

  • Gather context and review recent commits
  • Analyze CI failures (screenshot diffs, docs build failure)
  • Review changed files for correctness and style
  • Post inline findings
  • Summarize review

Verdict: ship (pending CI green)

2 inline findings — both informational/nit; no logic bugs found. All 4 findings from the previous review pass are confirmed fixed in efac312a.


What was reviewed

Reviewed the full 17-commit branch (1a5732d2→efac312a) against origin/feature/breakingchanges. Focused on:

  • Uno.CrossTargeting.targets — IsCrossruntime simplification, *.skia.cs and *.wasm.cs TFM-gate change
  • Uno.Common.Desktop.targets, Uno.Common.Wasm.targets — __DESKTOP__ / __WASM__ define promotion to TFM level
  • Uno.UI.SourceGenerators.props — XAML conditional prefix rewrite (XamarinProjectType → per-flag booleans)
  • RuntimeAssetsSelectorTask — removal of HandleSkiaMobileForNonRuntimeEnabledPackages
  • RuntimeAssetsValidatorTask — new UNOB0020 path, GetAssemblyMetadata fix, PlatformAssetValidator inner class
  • uno.winui.runtime-replace.targets — new task inputs and _UnoValidateReferencesUnoRuntimeIdentifier target
  • All 5 new test files (23 tests), AssemblyFixture / RecordingBuildEngine infrastructure
  • Documentation changes (7 doc files, 3 spec proposals)

Previous findings — all resolved

Finding Fix commit
DEL literal in Sanitize() → invisible in diffs efac312a — replaced with '\x7F'
GetAssemblyMetadata matched first attribute, not by key efac312a — key-matching loop
When_SingleLayer_Then_Task_Is_A_NoOp only asserted remove-lists, not add-lists efac312a — added add-list assertions
No positive-firing UNOB0020 test for ios/tvos efac312a — [DataRow] over android/ios/tvos
Dispose() only caught IOException, not UnauthorizedAccessException efac312a — catch (Exception e) when (e is IOException or UnauthorizedAccessException)

New inline findings (this pass)

Uno.CrossTargeting.targets line 7 — informational: confirms the *.skia.cs expansion to all non-WinAppSDK TFMs is intentional, and that the 3 remaining .skia.cs files in Uno.UI are safe to compile on mobile targets. No action required unless additional *.skia.cs files exist elsewhere with desktop-only code.

uno.winui.runtime-replace.targets line 90 — performance nit: _UnoValidateReferencesUnoRuntimeIdentifier has no target-level Condition, so it runs (and iterates RuntimeCopyLocalItems) on every build including desktop/wasm where UNOB0020 can never fire. The task guards internally so correctness is fine; a narrow Condition="'$(UnoRuntimeIdentifier)' != '' OR '$(UnoUIRuntimeIdentifier)' != ''" would save unnecessary iteration on class-library builds.


CI failures — attention needed

Screenshot diffs (73 Linux, 123 Windows from build 227924): These failures were reported before efac312a was pushed. The failing pages (Buttons, Focus_FocusVisual_Properties, ExpanderColorValidationPage, etc.) are general UI tests whose failure pattern does not match any code path changed in this PR — for Skia desktop builds, skia: and netstdref: XAML prefix resolution is identical before and after (both derive from UnoRuntimeIdentifier == 'Skia' / _IsUnoRendered = true), and the deleted files were already excluded from Skia builds by guards that were always false. Likely pre-existing flakiness or baseline drift. Confirm the new CI run (triggered by efac312a) clears these.

Docs build failure (build 227925): Also pre-efac312a. Needs investigation — check whether a doc cross-reference (xref:) or markdown link introduced by the new platform-specific-xaml.md/migrating-to-uno-7.md content is the cause. The UNOB0020 entry in uno-build-error-codes.md uses xref: style which DocFX validates strictly.


Cross-cutting observations

_IsWinAppSdkTarget detection — using $(TargetFramework.Contains('windows10')) rather than GetTargetPlatformIdentifier correctly distinguishes WinAppSDK (net*-windows10.x) from WPF (net*-windows) and from Uno desktop (net*-desktop). The comment explaining why is present and accurate.

_unoUITypeCache static dict keyed on (path, lastWriteTime) — safe cross-project sharing inside an MSBuild node process; the DateTime component invalidates on rebuild. The using var _ = originalAssembly pattern correctly disposes Cecil even when Validate() doesn't use the returned assembly.

NuGetPackageRoot migrated from Selector → Validator — the .targets file passes it only to the validator; the selector no longer declares it. Consistent.

macos: always excluded — confirmed pre-existing: XamarinProjectType was never set to 'macos' in the old code either, so macos: was a no-op before and remains one now. Not a behavioral change.

23/23 tests green per author validation; Uno.UI.Tasks.Tests wired into Uno.UI-UnitTests-only.slnf and CI test scope.

<!--
Every target framework Uno Platform provides is rendered by Uno itself; only the WinAppSDK one is
rendered by WinUI. Note this does not name a drawing backend: Uno.UI compiles once and selects its
backend at runtime.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old guard was '$(UnoRuntimeIdentifier)'=='Skia' or … =='WebAssembly' or … =='Reference' — which only fired when a runtime package was present, so it was false for class libraries. The new default-true / WinAppSDK-false means every non-WinAppSDK project now compiles *.skia.cs and *.crossruntime.cs, including -android, -ios, -tvos libraries. That is the stated intent and is documented in the breaking-change migration guide — flagging here so reviewers can confirm there are no remaining .skia.cs files in the tree that contain code only valid on desktop (the three remaining Uno.UI/…/…HighContrast.skia.cs files are safe: they only reference types that are available on all platforms).

@@ -89,9 +88,20 @@
</Target>

<Target Name="_UnoValidateReferencesUnoRuntimeIdentifier" BeforeTargets="CoreCompile">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_UnoValidateReferencesUnoRuntimeIdentifier runs BeforeTargets="CoreCompile" with no condition, so it fires for every project that imports this targets file — including net10.0-desktop and net10.0-browserwasm heads. The UNOB0020 check exits early inside CreatePlatformAssetValidator for non-mobile TargetPlatformIdentifier values (it logs MessageImportance.Low and returns null), so there is no correctness issue. Worth calling out in case you want to add a narrow target-level Condition to avoid iterating RuntimeCopyLocalItems on builds where the validator can never fire, e.g.:

<Target Name="_UnoValidateReferencesUnoRuntimeIdentifier"
    BeforeTargets="CoreCompile"
    Condition="'$(UnoRuntimeIdentifier)' != '' OR '$(UnoUIRuntimeIdentifier)' != ''">

This is a performance nit, not a correctness issue.

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 227948 found UI Test snapshots differences: skia-linux-screenshots: 73, skia-windows-screenshots: 113

Details
  • skia-linux-screenshots: 73 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DynamicFont.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • ContextRequested.png-dark
    • DropDownButtonPage.png-dark
    • Examples.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Image_Margin_Large.png
    • Attributed_text_FontSize_Changing.png
  • skia-windows-screenshots: 113 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • Basics.png-dark
    • Border_With_Off_Centre_RotateTransform.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • DisplayInformation.png-dark
    • Dopes.png-dark
    • EllipsemaskingEllipseGrid.png-dark
    • ElementLevelTheme.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • ElementLevelTheme.png
    • Focus_FocusVisual_Properties.png
    • Gamepad_CurrentReading.png-dark
    • ExpanderColorValidationPage.png-dark
    • Gamepad_Enumeration.png-dark

@MartinZikmund
MartinZikmund force-pushed the dev/mazi/referencebuild branch from efac312 to bb320f0 Compare August 18, 2026 13:45
@github-actions

github-actions Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 3m 51s —— View job


Review Complete

  • Gather context and understand the PR
  • Review latest changes since last review pass (bb320f01, f494efad)
  • Check CI failure patterns (73 Linux / 113 Windows screenshot diffs)
  • Review key changed files for correctness
  • Post inline findings
  • Summarize review

Verdict: ship (pending CI green)

No new blocking findings. All 5 findings from the previous review pass (f494efad) are resolved, and the new bb320f01 fix is correct.


What was reviewed this pass

Two commits since the previous review sign-off at efac312a:

  • f494efad — addresses all prior findings: DEL literal → '\x7F', UnauthorizedAccessException in fixture cleanup, add-list assertions in selector tests, ios/tvos positive-UNOB0020 rows, desktop/empty-identifier negative rows, androidskia: migration note.

  • bb320f01 — fixes the CI UpdateTasksSHA rewrite missing the test project:

    • The _Sha1Replace glob Uno.UI.Tasks\**\*.cs does not match Uno.UI.Tasks.Tests\ (different directory name), so the test files were compiled against _v0-suffixed types while the task DLL exported SHA-suffixed types.
    • Fix: introduce VersionedTaskAliases.cs with two global using aliases (RuntimeAssetsSelectorTask = …_v0, RuntimeAssetsValidatorTask = …_v0), refactor all three test classes to use the aliased names, and add only that one file to _Sha1Replace. In CI the rewrite transforms _v0 → _{SHA} in that file alone, keeping the rest of the test source unchanged. The pattern is clean and future-proof.

CI screenshot diffs — pre-existing, not a regression

Build 227948 still reports 73 Linux / 113 Windows screenshot diffs across the same set of controls (ButtonClippingTestsControl, CalendarView_Theming, DisplayInformation, etc.) as build 227924 before f494efad. For Skia desktop builds, the skia: / netstdref: XAML prefix resolution is identical before and after this PR — both were true whenever UnoUIRuntimeIdentifier == 'Skia', which is the same condition the new _IsUnoRendered captures for desktop heads. The deleted files were already excluded by permanently-false compile guards, so they cannot have caused visual regressions. These diffs are almost certainly pre-existing baseline drift; recommend re-running or re-baselining in a separate pass.


One remaining open nit (non-blocking)

_UnoValidateReferencesUnoRuntimeIdentifier in build/nuget/uno.winui.runtime-replace.targets line 90 runs BeforeTargets="CoreCompile" with no target-level condition, so it iterates RuntimeCopyLocalItems on every project — desktop, wasm, class libraries. The validator exits early internally for non-mobile TargetPlatformIdentifier values, so correctness is unaffected. A narrow condition (e.g. Condition="'$(TargetPlatformIdentifier)' == 'android' OR '$(TargetPlatformIdentifier)' == 'ios' OR '$(TargetPlatformIdentifier)' == 'tvos'") would avoid the iteration cost on builds where UNOB0020 cannot fire. This was flagged in the previous review pass and remains optional.

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 228408 found UI Test snapshots differences: skia-linux-screenshots: 73, skia-windows-screenshots: 102

Details
  • skia-linux-screenshots: 73 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • ContextRequested.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • Image_Margin_Large.png
    • DropDownButtonPage.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Attributed_text_FontSize_Changing.png
    • Buttons.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • ImageBrush_Stretch.png
    • Examples.png
    • Focus_FocusVisual_Properties.png-dark
  • skia-windows-screenshots: 102 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DeferLoadStrategyWithTemplateBinding.png-dark
    • Buttons.png
    • Contacts_Pick.png-dark
    • Contacts_Pick.png
    • ContextRequested.png-dark
    • ExpanderColorValidationPage.png-dark
    • DropDownButtonPage.png
    • ElementLevelTheme.png-dark
    • Examples.png
    • ImageIconPage.png-dark
    • ImageSourceUrlMsAppDataScheme.png-dark
    • ImageIconPage.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • ClipboardTests.png-dark
    • ContentPresenter_NativeEmbedding_Android_FillType.png
    • DisplayInformation.png-dark
    • DynamicFont.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • DynamicFont.png

MartinZikmund and others added 5 commits August 22, 2026 10:56
Cross-references every symbol defined in a DefineConstants element against every
symbol branched on in src, and sorts the asymmetry by cause: 47 defined and never
used, 77 used and never defined once SDK-provided and file-local symbols are
subtracted.

The useful part is the taxonomy rather than the lists -- consumer-facing symbols,
developer diagnostics, ported-code parking, vendored sources and MUX conventions
all look identical to dead code in a raw diff, and deleting on the raw lists would
break working code.

Three typos fall out of it, each reading as a live condition that can never be
true: #if __ANDROID missing its trailing underscores, #if WinUI against a symbol
spelled WINUI, and #if !DESKTOP against __DESKTOP__. The first is indistinguishable
from the ported-code parking pattern, which is why that pattern needs one reserved
spelling.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01PTBMNbcPLwzdYrtPzY8s9Z
Evaluates every #if and #elif in the single-flavor projects against the define set
MSBuild actually produces, rather than inferring it, and honours file-local
defines. Files compiled into more than one project are excluded, and
configuration-dependent symbols are never folded -- a Debug dump would otherwise
mark every #if DEBUG as constant.

src/Uno.UI carries 356 always-false and 643 always-true conditionals, but the
actionable set is much smaller than that: IS_UNIT_TESTS and __NETSTD_REFERENCE__
account for most of the deletable half, while the always-true half is dominated by
#if HAS_UNO, which marks Uno's deviations from the upstream WinUI sources and is
the provenance the porting rules exist to preserve.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01PTBMNbcPLwzdYrtPzY8s9Z
markdownlint MD028 fails the docs build when two blockquotes are
separated only by a blank line. Merge the two consecutive notes, and
move the tip above the paragraph it supports.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GP2BeVCQzY3sQB7QBv173u
- Spell the DEL character as an escape so the sanitizer is legible.
- Tolerate UnauthorizedAccessException in the fixture cleanup.
- Assert the selector's add-lists are empty where the test claims the
  assets are untouched.
- Cover ios and tvos heads for UNOB0020, and desktop and an unset
  identifier for the negative case.
- Document the *skia XAML prefix aliases in the migration guide.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GP2BeVCQzY3sQB7QBv173u
The CI `UpdateTasksSHA` target renames the MSBuild task classes to carry the
build SHA, but the substitution list never covered `Uno.UI.Tasks.Tests`, so the
unit tests stage failed to compile against the renamed types. Isolate the
versioned names in a single alias file and add that file to the list.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_017MKZkUqyoXz1ggvvfPEQvC
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/referencebuild branch from e2732b3 to ec43a5d Compare August 22, 2026 09:51
@github-actions

github-actions Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 5m 49s —— View job


Review Complete

  • Gather context and identify new commits since last review
  • Review new changes vs base
  • Check key files for correctness
  • Post inline findings
  • Summarize review

Verdict: ship (pending CI screenshot investigation)

No new blocking findings. The two commits since the previous review sign-off (56a4f8d4, ec43a5de) are identical in content to the commits reviewed on 2026-08-21 — the branch was rebased, reassigning SHAs. All 6 findings from all prior passes remain confirmed resolved.


What was reviewed this pass

Full diff against origin/feature/breakingchanges (all 18 commits, 45 files):

  • RuntimeAssetsValidatorTask.cs — GetPlatformSpecificPackageAsset segment-count guard, GetAssemblyMetadata key-match loop, _unoUITypeCache concurrency model, Sanitize('\x7F'), CreatePlatformAssetValidator() early-exit path
  • RuntimeAssetsSelectorTask.cs — removal of HandleSkiaMobileForNonRuntimeEnabledPackages, remaining two-layer logic
  • Uno.CrossTargeting.targets — IsCrossruntime default-true / WinAppSDK-false; *.skia.cs and *.crossruntime.cs expansion; *.reference.cs stays on UnoRuntimeIdentifier
  • Uno.UI.SourceGenerators.props — per-TFM platform flags (_IsAndroid, _IsIOS, etc.); _IsUnoRendered vs _IsWinAppSdkTarget; androidskia: bundled with android:
  • Uno.Common.Desktop.targets / Uno.Common.Wasm.targets — __DESKTOP__ / __WASM__ guard with already-defined check
  • uno.winui.runtime-replace.targets — validator task wiring, _UnoDisableUNOB0020Validation normalization
  • AssemblyFixture.cs, test files — Cecil fixture correctness, RecordingBuildEngine, Dispose() exception filter
  • VersionedTaskAliases.cs + build/Uno.UI.Build.csproj — SHA rewrite isolation (exact file path, not glob)
  • Documentation (7 files) and 3 spec proposals — migration guide platform targeting section, UNOB0020 error code entry

Previous findings — all confirmed resolved

Finding Fixed in
DEL literal invisible in diffs 56a4f8d4 — '\x7F'
GetAssemblyMetadata matched first attribute, not by key earlier pass
Selector test only asserted remove-lists 56a4f8d4 — add-list assertions added
No positive-firing UNOB0020 test for ios/tvos 56a4f8d4 — [DataRow] over three platforms
Dispose() only caught IOException 56a4f8d4 — catch ... when (e is IOException or UnauthorizedAccessException)
Tests compiled against pre-SHA names in CI ec43a5de — VersionedTaskAliases.cs

One remaining acknowledged nit (non-blocking)

_UnoValidateReferencesUnoRuntimeIdentifier in uno.winui.runtime-replace.targets:90 runs BeforeTargets="CoreCompile" with no target-level condition — it fires for every project, including desktop and wasm. The task exits early inside CreatePlatformAssetValidator() when TargetPlatformIdentifier is not android/ios/tvos, so correctness is unaffected. The Cecil opens for the stamp check still happen. Adding a condition that covers only the platforms where UNOB0020 can fire would skip the stamp check too, which is not clearly safe — the current behavior is correct.


CI screenshot diffs — unresolved, recommend investigation before merge

Build 229231 reports 73 Linux / 190 Windows diffs. The Windows count has climbed across every CI run (123 → 113 → 102 → 172 → 190 across 5 runs), which is more than random flakiness.

For Skia desktop specifically, skia: / netstdref: prefix resolution is unchanged: both before and after, they derive from a condition that is true whenever UnoRuntimeIdentifier == 'Skia' is set (Skia desktop heads always set it). The deleted files were guarded by #if SKIA / #if !NETSTD_REFERENCE combinations that made them dead on Skia — removing them cannot affect Skia rendering. So this PR is almost certainly not the cause.

That said, the growing count (73 stable on Linux, 190 and rising on Windows) is unusual. The affected pages — Buttons, CalendarView_Theming, Focus_FocusVisual_Properties, ExpanderColorValidationPage, DropDownButtonPage — are broad enough that a Windows font-rendering or DPI change upstream could explain the drift. Recommend a targeted investigation (screenshot diff viewer, comparison against a clean feature/breakingchanges build) before merging, even if the root cause turns out to be pre-existing.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 229429 found UI Test snapshots differences: skia-linux-screenshots: 73, skia-windows-screenshots: 159

Details
  • skia-linux-screenshots: 73 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • ContentControl_Inheritance.png
    • Examples.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • DynamicFont.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • ImageBrush_Stretch.png
    • CalendarView_Theming.png-dark
    • DropDownButtonPage.png-dark
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • ElementLevelTheme.png-dark
  • skia-windows-screenshots: 159 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png-dark
    • Dopes.png-dark
    • Focus_FocusState.png-dark
    • Focus_FocusState.png
    • FocusManagerTest.png-dark
    • FocusManagerTest.png
    • BitmapImage_vs_SvgImageSource.png
    • CalendarView_Theming.png
    • Buttons.png-dark
    • ChatBox.png-dark
    • EllipsemaskingEllipseGrid.png
    • Contacts_Pick.png-dark
    • Contacts_Pick.png
    • DynamicFont.png-dark
    • DynamicFont.png
    • Examples.png
    • BitmapImage_vs_SvgImageSource.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark

MartinZikmund added a commit that referenced this pull request Aug 26, 2026
The type-name sanitizer compared against a literal U+007F byte embedded
in the source, which is invisible in review and depends on the file
surviving an encoding round-trip. Spell it as an escape instead.

Carried over from #24087, which is otherwise already merged.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_011vgZ3cDuKKFqDCPDLpWSPu
MartinZikmund added a commit that referenced this pull request Aug 26, 2026
UNOB0020 was only exercised for an android head and only rejected for
browserwasm; it now runs for ios and tvos, and the negative case covers
desktop and an unset identifier. The selector tests claimed the assets
were untouched while asserting only the remove-lists.

PackageCacheFixture cleanup also tolerates UnauthorizedAccessException,
which Windows raises instead of IOException when a handle is still open.

Carried over from #24087, which is otherwise already merged.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_011vgZ3cDuKKFqDCPDLpWSPu
@MartinZikmund

Copy link
Copy Markdown
Member Author

Closing this as superseded rather than rebasing it — it is 219 commits behind feature/breakingchanges with 13 conflicting files, and almost all of its content has already landed by other routes.

What was checked. git cherry reports 14 of the 18 commits as patch-identical upstream. The remaining four were verified individually:

Commit Status
f47d8a8f72 delete source the Reference fold made unreachable Already landed — all 12 paths verified: 11 files are already deleted on the base, and the UnoAssemblyHelper.cs edit dropping Uno.UI.Reference / Uno.UI.Composition.Reference is present
ec43a5de0a apply the task SHA rewrite to the tests Superseded — the base solves the same CI failure more broadly: build/Uno.UI.Build.csproj already lists ..\src\SourceGenerators\Uno.UI.Tasks.Tests\*.cs in _Sha1Replace, and the tests reference RuntimeAssetsSelectorTask_v0 directly, so the VersionedTaskAliases.cs indirection is no longer needed
831cebf007 docs blockquote formatting Cosmetic markdown in doc files the base has since rewritten; not carried over
56a4f8d4f1 address review feedback Partly landed — the androidskia: / iosskia: / tvosskia: / wasmskia: migration-guide rows are on the base already; three items were not

What was carried over, into #24089 (same base branch):

  • fix(build): Escape the DEL character in the sanitizer — RuntimeAssetsValidatorTask still compared against a literal U+007F byte embedded in the source.
  • test(build): Cover ios/tvos heads and the selector add-lists — UNOB0020 now runs for ios and tvos rather than android alone, the negative case covers desktop and an unset identifier as well as browserwasm, the selector tests assert the add-lists they previously ignored, and PackageCacheFixture cleanup tolerates UnauthorizedAccessException alongside IOException.

Verified with dotnet test Uno.UI.Tasks.Tests on the net11 SDK: 27/27 passing, including the four new data rows.

Nothing else from this branch is outstanding.

auto-merge was automatically disabled August 26, 2026 08:58

Pull request was closed

MartinZikmund added a commit that referenced this pull request Aug 28, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Aug 29, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Sep 2, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Sep 10, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Sep 23, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Sep 29, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Oct 1, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Oct 2, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Oct 3, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Oct 9, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Oct 9, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Oct 10, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Oct 10, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
MartinZikmund added a commit that referenced this pull request Oct 10, 2026
The Uno.WinUI package shipped two MSBuild files that only a legacy,
non-`Uno.Sdk` project could reach:

- `uno.winui.single-project.targets`, imported when `$(SingleProject)` is true —
  the 5.1-and-earlier single-project layout, since superseded by the Uno.Sdk's
  own `Uno.DefaultItems.SingleProject` / `Uno.ProjectCapabilities.SingleProject`
  / `Uno.SingleProject.*` targets.
- `uno.winui.win.targets`, shipped only into the `uap10.0.*` buildTransitive
  folders. The package carries no `lib/uap10.0.*` assets and no `uap10.0`
  dependency group, so a UWP head already resolved nothing from it.

A new UNOB0021 error replaces them for application heads, so a legacy project
gets one actionable diagnostic pointing at the migration guide instead of a wall
of missing-target failures. It can only see `OutputType`, so an executable that
merely links Uno.WinUI trips it too — `UnoDisableUNOB0021Validation` opts out,
mirroring the existing `UnoDisableUNOB0002Validation`.

Libraries keep building from a plain `Microsoft.NET.Sdk` project, and WinAppSDK
heads are untouched — that path does not import `uno.winui.common.targets`.

UNOB0020 is deliberately skipped: PR #24087 claims it for the runtime-asset
validator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TkmzHzEzSGmbD66HKNhQHi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/build Categorizes an issue or PR as relevant to build infrastructure area/code-generation Categorizes an issue or PR as relevant to code generation kind/documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants