Skip to content

build: Consolidate SamplesApp into a single Uno.Sdk head (Skia + WinUI) - #23536

Merged
MartinZikmund merged 68 commits into
feature/breakingchangesfrom
dev/mazi/samplesapp-unosdk
Aug 11, 2026
Merged

MartinZikmund merged 68 commits into
feature/breakingchangesfrom
dev/mazi/samplesapp-unosdk

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: closes unoplatform/uno-private#2151 (internal: "Convert Samples app to Uno.Sdk", Platform 7.0)

PR Type:

🏗️ Build or CI related changes

What changed? 🚀

Consolidates the four separate SamplesApp heads (SamplesApp.Skia.Generic, SamplesApp.Skia.WebAssembly.Browser, SamplesApp.Skia.netcoremobile, SamplesApp.Windows) into one Uno.Sdk-based multi-targeted head, src/SamplesApp/SamplesApp.Head, that targets every Skia target plus WinUI/WinAppSDK:

net10.0-desktop;net10.0-browserwasm;net10.0-windows10.0.19041.0;net10.0-android;net10.0-ios;net10.0-tvos

Approach

  • Sdk="Uno.Sdk.Private", consumed from the in-repo src/Uno.Sdk (packed at a fixed sentinel version into src/PackageCache, pinned in root global.json). A build/pack-local-uno-sdk.ps1 produces it.
  • Hybrid framework consumption (default): DisableImplicitUnoPackages=true + per-TFM ProjectReferences to in-repo Uno source — the repo's from-source model. A SamplesAppUseImplicitPackages switch (default false) flips to the customer-facing <UnoFeatures>→NuGet path on demand.
  • Samples content: all Skia TFMs reference the generic-Skia SamplesApp.Skia library (samples compile once as Skia); WinUI inlines the shared content and uses the real WinUI XAML compiler (its Microsoft.UI.Xaml has a different type identity than Uno.UI.Skia).
  • Per-TFM entry points under Platforms/{Desktop,WebAssembly,Windows,Android,iOS,tvOS}/.

Build status (from this branch)

Target Build Validated
desktop dotnet build ✅ builds + boots + runtime-test slice passes
browserwasm dotnet build ✅ builds
windows / WinUI MSBuild.exe ✅ builds (full sample set)
android dotnet build ✅ builds
ios + tvos — ⚠️ wired; requires macOS to build (not validated on Windows)

CI

All platform build/test stages and scripts (desktop, wasm, android + coreclr/nativeaot, ios, winappsdk) are repointed to the new head — platform TFMs, bin/SamplesApp.Head/... output paths, SamplesApp.dll for desktop runtime tests, MSBuild.exe kept for WinUI. Pending validation on the real pipelines.

Notable findings (documented in specs/051-samplesapp-unosdk-skia/)

  • windows built once the WinUI assembly is named SamplesApp.Windows (avoids an InternalsVisibleTo × assembly-name collision with Uno.UI.Toolkit/Uno.Foundation) and Uno's source generators are gated off WinUI.
  • android built once samples come from the base lib rather than inlining (inlining compiled them with __ANDROID__, pulling native-only types absent from Uno.UI.Skia).

Not in this PR (deliberate)

  • Old head projects are not deleted yet — the base lib and the (separately-removed) native SamplesApp.Wasm share SamplesApp.Windows resources, and the RuntimeTests ALC/HotReload apps reference the Generic head's bin. Deletion is best coordinated with the native-head removal (and relocating Package.appxmanifest).
  • Follow-ups: iOS/tvOS macOS validation; wasm PWA icons; the Resizetizer android splash-raster registration under Uno.Sdk single-project (worked around with a manual splash_screen drawable); WinUI dotnet run/winapp dev-loop.

PR Checklist ✅

  • 🧪 Manual test sample / existing runtime tests exercised (desktop runtime-test slice run against the new head; this is build-infra, no new tests added)
  • 📚 Spec + implementation plan added under specs/051-samplesapp-unosdk-skia/
  • 🖼️ Validated PR Screenshots Compare Test Run results (pending CI)
  • ❗ Contains NO breaking changes (no public-API break — samples-app/build-infra restructuring; targeted at the breaking-changes integration branch)
  • 👀 Reviewed 2 other open pull requests

@github-actions github-actions Bot added platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform 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 Jun 24, 2026
@github-actions

github-actions Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

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


PR Review — Consolidate SamplesApp into Uno.Sdk head

  • Gather context and understand the request
  • Read key changed files (csproj, entry points, CI scripts, pack script)
  • Analyze diff for issues against AGENTS.md rules
  • Post inline review comments
  • Update summary comment

Overall verdict

This is a well-structured consolidation. The approach (Uno.Sdk.Private pinned via global.json, hybrid source-mode ProjectReferences, per-TFM Platforms/ entry points) is sound, and the build-infra notes in the spec/plan are unusually thorough. Four targeted issues found; one of them (missing ApplicationId) would cause a silent CI failure on the first real Android pipeline run.

Findings by severity

# Severity File Finding
1 Medium SamplesApp.Head.csproj:8 iOS/tvOS TFMs drop the platform-version suffix (net10.0-ios instead of net10.0-ios26.0) inconsistent with $(NetCurrentNetCoreMobile); all non-Windows TFMs should use $(NetCurrent)-* instead of hardcoded net10.0-* per build-system rules
2 Medium SamplesApp.Head.csproj:245 <ApplicationId> not set for the Android TFM — CI expects uno.platform.samplesapp.skia-Signed.apk but .NET Android will derive the package ID from the assembly name, not that value; coreclr/nativeaot variants pass -p:ApplicationId= explicitly on the CLI, the Mono build does not
3 Low Main.Android.cs:29-36 7 [assembly: UsesPermission] attributes duplicated across Main.Android.cs and AssemblyInfo.Android.cs; INTERNET only in Main.Android.cs, fragmenting the manifest source of truth
4 Low Main.Android.cs:57-82 26-line Chromium BSD license block inside a constructor body — code-style prohibits "wall of text" comments; a short attribution + URL suffices
5 Low Main.Android.cs, MainActivity.Android.cs #nullable enable missing from new C# files (code-style.md requirement)
6 Low Program.cs:25 Main(string[] args) receives CLI args but they aren't forwarded; runtime tests args (--runtime-tests=…) are accessible via Environment.GetCommandLineArgs() so this isn't a functional bug, but should be documented or forwarded explicitly

Cross-cutting notes

  • NoWarn growth: WASM (16 IL-trimmer codes, line 178) and Android (14 codes, line 259) each add a substantial <NoWarn> block. These appear carried over from the old heads, so they're not new suppressions, but they represent a meaningful noise floor going forward. Tracking them separately is fine; just flagging for awareness.
  • Validation label: The PR correctly notes iOS/tvOS macOS validation is pending. The desktop runtime-test slice validates the critical path.
  • Old heads not deleted: Deferred deletion is explained and intentional — no action needed here.
  • Commit titles all follow Conventional Commits. ✅

@unodevops

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

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


PR Review — Consolidate SamplesApp into Uno.Sdk head

  • Gather context and understand the request
  • Read key changed files (csproj, entry points, CI scripts)
  • Analyze diff for issues against AGENTS.md rules
  • Post inline review comments
  • Update summary comment

Overall verdict

Well-structured consolidation with a sound approach. Six targeted findings; the two medium-severity ones have real CI impact.

Findings by severity

# Severity File Finding
1 Medium SamplesApp.Head.csproj:8 iOS/tvOS TFMs missing platform-version suffix (net10.0-ios instead of net10.0-ios26.0; net10.0-tvos instead of net10.0-tvos26.0). All non-Windows TFMs hardcode net10.0-* instead of using $(NetCurrent)-* per build-system.md.
2 Medium SamplesApp.Head.csproj:259 <ApplicationId> not set for the Android TFM. The standard Mono CI build in .azure-devops-tests-android-skia-build.yml does not pass -p:ApplicationId= on the CLI (unlike coreclr/nativeaot), so the CopyFiles step expecting uno.platform.samplesapp.skia-Signed.apk will silently find nothing on the first real Android pipeline run.
3 Low Main.Android.cs:29–36 Seven [assembly: UsesPermission] attributes duplicated between Main.Android.cs and AssemblyInfo.Android.cs; INTERNET only in Main.Android.cs, fragmenting the manifest source of truth. AndroidManifest.xml already says "Add permissions in AssemblyInfo.cs".
4 Low Main.Android.cs:56–82 26-line Chromium BSD license block inside a constructor body — violates the code-style rule prohibiting "wall of text" comments. A two-line attribution + URL satisfies OSS obligations without reproducing the full license text in a method body.
5 Low Main.Android.cs:1, MainActivity.Android.cs:1 #nullable enable missing from both new C# files (required by code-style.md for new files).
6 Low Platforms/Desktop/Program.cs:25 args received by Main(string[] args) silently discarded — Run() takes no parameters. Runtime-test tooling flags are accessible via Environment.GetCommandLineArgs(), so this isn't a functional regression, but the intent should be documented.

Cross-cutting notes

  • NoWarn growth: WASM (16 IL-trimmer codes) and Android (14 codes) each carry a substantial <NoWarn> block carried over from the old heads — not new suppressions, but a meaningful baseline noise floor going forward.
  • iOS/tvOS macOS validation: Correctly flagged as pending in the PR; no action needed here.
  • Old heads not deleted: Intentional and explained — no action needed.
  • Validation: Code review (diff inspection) only. No local compile or runtime execution performed — this is build-infra, and the CI pipelines are the authoritative validation gate.

@unodevops

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

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


PR Review — Consolidate SamplesApp into Uno.Sdk head

  • Gather context and understand the request
  • Read key changed files (csproj, entry points, CI scripts, pack script)
  • Analyze diff for issues against AGENTS.md rules
  • Post inline review comments
  • Update summary comment

Overall verdict

The latest 5 commits correctly address real CI blockers (locked .dotnet DLLs preventing the dotnet-install cache restore, missing wasm asset manifest, signing-identity failure from auto-wired entitlements, and publish-item validation running on Android/iOS where it can never pass). Those fixes are well-scoped and technically sound.

Six findings from the two prior review rounds remain unaddressed. Two of them have real CI impact.

Findings by severity

# Severity File Finding
1 Medium SamplesApp.Head.csproj:8 net10.0-ios and net10.0-tvos are missing the 26.0 version suffix — they target a different (default) SDK version than the rest of the build. All five non-Windows TFMs hardcode net10.0-* instead of $(NetCurrent)-* per build-system.md.
2 Medium SamplesApp.Head.csproj:259 <ApplicationId> not set for the Android TFM. The standard Mono CI build does not pass -p:ApplicationId= on the CLI (unlike coreclr/nativeaot), so the CopyFiles step expecting uno.platform.samplesapp.skia-Signed.apk will silently find nothing.
3 Low Main.Android.cs:29–36 7 [assembly: UsesPermission] attributes duplicated with AssemblyInfo.Android.cs; INTERNET only in Main.Android.cs, fragmenting the manifest source of truth.
4 Low Main.Android.cs:56–82 26-line Chromium BSD license block inside a constructor body — code-style prohibits "wall of text" comments; a 2-line attribution + URL suffices.
5 Low Main.Android.cs:1 #nullable enable missing (code-style.md requirement for new files).
6 Low MainActivity.Android.cs:1 #nullable enable missing (code-style.md requirement for new files).

New-commit notes (no new findings)

The pack script (build/pack-local-uno-sdk.ps1) correctly uses --disable-build-servers to prevent VBCSCompiler from locking .dotnet/shared/**/*.dll, and the dotnet build-server shutdown call afterward is belt-and-suspenders. The ordering in dotnet-install.yml is safe: UseDotNet@2 only installs the SDK toolchain; MSBuild SDK resolution (which needs Uno.Sdk.Private) doesn't run until the first project is evaluated, after the pack step completes.

Validation: Code review (diff inspection) only — build-infra changes; CI pipelines are the authoritative gate.

MartinZikmund and others added 4 commits August 11, 2026 09:54
Nothing consumes the sentinel package now. Deletes the pack script and
its CI template, drops the pin from the three global.json files, and
removes the pack step from the seven pipelines that ran it.

All three global.json files return to their pre-branch contents.
src/SolutionTemplate/** is unaffected: those projects pin their own
published Uno.Sdk.Private versions from real feeds.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_015xdwWkWw7bVkiotSp3Gdtc
Replaces the per-platform startup-project instructions with the single
head plus the target-framework dropdown, and records the SDK-import
revision in specs/051.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_015xdwWkWw7bVkiotSp3Gdtc
The head is the SamplesApp now that it covers every platform, so the
".Head" qualifier only added noise. Moves the project to
src/SamplesApp/SamplesApp/SamplesApp.csproj and updates the solution,
both filters, _AdjustedOutputProjects, the seven CI pipelines and the
iOS UI-test script — including the bin/SamplesApp.Head output paths,
which move with the project name.

Program.cs drops to `namespace SamplesApp`, which makes its explicit
SamplesApp.App qualification redundant.

AssemblyName stays explicit even though it now matches the project name:
nine InternalsVisibleTo("SamplesApp") grants across the framework key off
that exact string.

SamplesApp.Skia keeps its name — it is slated for removal outright.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_015xdwWkWw7bVkiotSp3Gdtc
Rebase carry-over. feature/breakingchanges renamed the UI-layer projects
(f5d6efd) and folded the MSAL Reference flavor into Skia (e48de10)
after this branch forked, so the head's ProjectReferences pointed at paths
that no longer exist. Mirrors the same retarget base applied to
SamplesApp.Skia.csproj.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_0162Wt7JNLnEiowb8UZUSkAt
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/samplesapp-unosdk branch from 0d90e18 to 1d79805 Compare August 11, 2026 08:09
@github-actions

github-actions Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 30s —— View job


PR Review — Consolidate SamplesApp into Uno.Sdk head

  • Gather context and understand the request
  • Check new commits since last review
  • Read changed files
  • Analyze for new issues
  • Post inline review comments (none needed — no new findings)
  • Update summary comment

Overall verdict

The single new commit (1d79805e) is a clean, targeted fix. No new findings from this commit. All prior-round findings remain resolved.

New-commit notes (no new findings)

  • 1d79805e (build(samplesapp): Retarget head refs to the de-.Skia'd projects): Correct rebase carry-over. feature/breakingchanges renamed the UI-layer projects in f5d6efd00b6 (removing the .Skia suffix from the project-file names of Uno.UI, Uno.UI.Composition, Uno.UI.FluentTheme, Uno.UI.RemoteControl, Uno.UI.Lottie, and Uno.UI.Svg) and folded the MSAL Reference flavor into Skia in e48de101dc5. All six path updates are correct, and the two Uno.UI.MSAL.Reference.csproj → Uno.UI.MSAL.Skia.csproj replacements (in the _IsSkiaTfm and browserwasm groups) are correct — Uno.UI.MSAL.Skia.csproj targets $(NetSkiaPreviousAndCurrent), which includes both desktop and browserwasm TFMs. All 8 changed paths were verified to exist on disk. Projects that kept their .Skia suffix (Uno.UI.Toolkit.Skia.csproj, Uno.UI.RuntimeTests.Skia.csproj) are left unchanged — correct, as those were not renamed in the base.

Resolved findings (full history)

# Severity Finding Resolution
1 Medium iOS/tvOS TFMs missing Apple version suffix ✅ c0c1b3b9 via $(NetCurrentAppleOSVersion)
2 Medium ApplicationId not set for Android TFM ✅ fb317e175f
3 Medium Info.plist / LinkerConfig.xml / app.manifest stale old-head names ✅ 7d83ea1c
4 Low Permissions fragmented across two Android files ✅ 66c605c3b8
5 Low args silently dropped in Program.cs ✅ Documented 66c605c3b8
6 Low plan.md references private tooling identifiers ✅ 0687c8d6
7 Low environment.conf BOM + HTTP URL ✅ c4485e21
8 Low Unused using directives in Android files ✅ 1110e049
9 Low #nullable enable missing in Android files ⏭️ Declined — verbatim moves; annotation pass out of scope
10 Low BSD-3-Clause block in constructor body ⏭️ Declined — legally required notice

Cross-cutting note

The CI run (build 222277) reported 73 Linux + 83 Windows screenshot differences. These predate the current commit and need to be reviewed in the Screenshots Compare test run; baselines should be accepted or corrected before merge.

Validation: Code review (diff inspection) and local file reads. All 8 updated ProjectReference paths verified to exist on disk. Uno.UI.MSAL.Skia.csproj target-frameworks confirmed as $(NetSkiaPreviousAndCurrent) (covers both desktop and browserwasm). Uno.UI.Toolkit.Skia.csproj and Uno.UI.RuntimeTests.Skia.csproj confirmed unchanged and still correctly named. No local compile or runtime execution — build-infra changes; CI pipelines are the authoritative gate.

Comment thread src/Directory.Build.props Resolved
@unodevops

Copy link
Copy Markdown
Contributor

MartinZikmund and others added 2 commits August 11, 2026 11:46
The entry only inserted a `SamplesApp` segment into bin/ and obj/. Its stated
reason -- keeping the six target frameworks from colliding -- does not hold:
Microsoft.NET.DefaultOutputPaths.targets already appends $(TargetFramework) to
both paths. The list exists for folders holding several project variants
(Uno.UI.Skia.csproj + Uno.UI.Reference.csproj); this head is alone in its
folder. The DefaultItemExcludes half is covered by the .NET SDK, which excludes
$(BaseOutputPath)/** and $(BaseIntermediateOutputPath)/** on its own.

Reverts the six CI artifact paths to bin/Release/<TFM>/ accordingly.

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

The head carried 55 calls to GetTargetPlatformIdentifier('$(TargetFramework)')
across 50 lines, each ~100 characters, which is most of what makes the file look
dense. Compute the platform identifier once into $(_Platform) and gate on that.

The declaration must sit below the windows TargetFramework collapse, and cannot
be replaced by Uno.Sdk's $(IsAndroid)/$(IsWinAppSdk): those default to false
during the Sdk.props import at the top of the file, and are only corrected by
Uno.Common.*.targets at the bottom -- after every PropertyGroup condition here
has been evaluated. Hoisting the declaration above the collapse makes the
WinAppSDK publish resolve AssemblyName to SamplesApp instead of SamplesApp.Windows
and _IsSkiaTfm to true, pulling 14 ProjectReferences instead of 6.

The one remaining call reads $(UnoTargetFrameworkOverride) and is left alone.
Also drops _IsMobile, which had no uses.

Verified inert: MSBuild evaluation of ProjectReference, PackageReference,
Content, AndroidAsset, BundleResource, EmbeddedResource, UnoIcon,
UnoSplashScreen, TrimmerRootAssembly plus UnoRuntimeIdentifier, AssemblyName,
DefineConstants, NoWarn and ApplicationManifest is byte-identical before and
after on all six target frameworks, including ios/tvos and the windows collapse
path. Confirmed the comparison is sensitive by hoisting the declaration and
watching the windows evaluation change.

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

Copy link
Copy Markdown
Contributor

MartinZikmund and others added 3 commits August 11, 2026 11:57
- NU1703 was suppressed twice; the unconditional one at the top already covers
  the android restore, so the android NoWarn no longer repeats it.
- The wasm and android trimming suppressions shared 13 codes; those move to
  _UnoTrimmingNoWarn, leaving each platform to list only what is its own.
- Microsoft.Extensions.Logging.Console/.Debug carried an inline 5.0.0 that
  Directory.Build.targets already pins to the same version via
  PackageReference Update, so the local value never applied.
- Merges adjacent groups sharing a condition: the two android PackageReference
  groups, the android ApplicationId PropertyGroup, and the three desktop item
  groups. Item order within each merged group is preserved.

Verified inert: MSBuild evaluation of the same item and property set is
unchanged on all six target frameworks, with NoWarn compared as a set (the
codes are reordered, not altered).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DcqC3aauPNqhMqHvoZwNda
The old WebAssembly head gated Issue109289_Workaround on
NETCoreSdkVersion.StartsWith('9.0.'), so it never ran on the .NET 10/11 SDKs
this repo builds with. Consolidating the heads dropped that gate, silently
turning a dead target into a live one that rewrites the emcc link arguments on
every wasm build.

Restoring the gate would just reinstate dead code, so the target goes instead.
Verified with a net10.0-browserwasm build that runs the native link step
(WasmBuildNative=true): wasm-ld succeeds, and libSkiaSharp.a is already ordered
last in the link line, which is what the workaround existed to force.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DcqC3aauPNqhMqHvoZwNda
Nine comment blocks in the head were multi-paragraph explanations of MSBuild
and SDK behaviour. Each keeps a one- or two-line statement of why the line is
there; the long form moves to a new appendix in
specs/051-samplesapp-unosdk-skia/plan.md, which the file header points at.

This is a move, not a delete: the spec had no coverage of NETSDK1129,
MonoAndroidAssetsPrefix, Uno0005, IL2008 or the iOS reserved Resources folder
before this.

Two corrections while there. The UnoRuntimeIdentifier comment claimed Uno.Sdk
sets it too late for cross-targeting; in fact Uno.Common.Desktop.targets sets it
for desktop in good time, and the real reason the head sets it is browserwasm,
where nothing in Uno.Sdk does. And the two ordering constraints that had no
comment now have one: the Runtime.Skia.Android fragment must precede the
source-generator import, and the shared-content imports must stay below
Sdk.props.

Verified inert: with restore state held fixed, MSBuild evaluation is identical
before and after on all six target frameworks.

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

github-actions Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

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


PR Review — Consolidate SamplesApp into Uno.Sdk head

  • Gather context and understand the request
  • Check new commits since last review (5 new commits)
  • Read key changed files (Directory.Build.props, SamplesApp.csproj, specs)
  • Answer @MartinZikmund's questions on the review threads
  • Check for any new issues in latest commits
  • Post inline review comments for any new/unresolved issues (none needed — no new findings)
  • Update summary comment

Overall verdict

The five new commits (549bb797, 44a036a6, 0fcc2edb, 0211ff0d, 4a944b08) are all clean and well-targeted. No new findings from any of these commits. All prior-round findings remain resolved. The two inline questions @MartinZikmund left on review threads are answered by the commits themselves — see below.

Response to inline thread questions

src/Directory.Build.props — "Why is this change needed?"
Answered by 549bb797. The entry SamplesApp.csproj was removed from _AdjustedOutputProjects in Directory.Build.props. The _AdjustedOutputProjects mechanism exists for folders that hold multiple project-file variants side-by-side (e.g. Uno.UI.csproj + Uno.UI.Reference.csproj), which would collide in bin/ without the per-project subdirectory the mechanism inserts. SamplesApp.csproj is the only project in its folder; Microsoft.NET.DefaultOutputPaths.targets already appends $(TargetFramework) to both BaseOutputPath and BaseIntermediateOutputPath for every inner build, so there is no collision to prevent. Six CI artifact paths were updated accordingly from bin/SamplesApp/Release/<TFM>/ to bin/Release/<TFM>/.

src/SamplesApp/SamplesApp/SamplesApp.csproj — "The .csproj looks very complex, can it be simplified?"
Addressed across three commits:

  • 44a036a6: 55 GetTargetPlatformIdentifier('$(TargetFramework)') calls (each ~100 chars, 50 lines) collapsed into one $(_Platform) property. The declaration position below the windows TargetFramework collapse is load-bearing — the commit message and the inline comment at line 31 explain why $(IsAndroid)/$(IsWinAppSdk) can't substitute (they default to false during Sdk.props evaluation and are only corrected by Uno.Common.*.targets at the bottom). Verified inert by MSBuild evaluation comparison on all six TFMs.
  • 0fcc2edb: Duplicate condition groups merged, shared trimmer NoWarn codes factored into _UnoTrimmingNoWarn, dead Microsoft.Extensions.Logging 5.0.0 version pins dropped (already covered by PackageReference Update in Directory.Build.targets).
  • 4a944b08: Nine multi-paragraph MSBuild explanation comment blocks moved from the csproj to a new appendix in specs/051-samplesapp-unosdk-skia/plan.md; the file header (line 5) points there. Each moved block leaves a one- or two-line inline summary. Two corrections to comment accuracy: UnoRuntimeIdentifier rationale (Uno.Common.Desktop.targets sets it for desktop, but nothing in Uno.Sdk covers browserwasm) and two missing ordering constraint comments.

The result is a csproj that is ~150 lines shorter, with comments explaining why rather than narrating MSBuild mechanics.

New-commit notes (no new findings)

  • 549bb797: The _AdjustedOutputProjects removal is correct for the reasons above. Six CI paths correctly updated. The bin/SamplesApp.app on line 59 of .azure-devops-tests-ios-skia-build.yml is the destination artifact staging folder name, not a source path — it is correct.
  • 44a036a6: _Platform computed from $(TargetFramework) in the correct position (below the windows collapse). _IsMobile dropped — it had no uses. Verified inert on all six TFMs including the windows collapse path.
  • 0fcc2edb: NU1703 now suppressed once unconditionally (correct: NuGet restore runs before per-TFM groups apply). RuntimeIdentifiers android Release group correctly kept separate (it's Release-only). ApplicationId property group correctly placed before the Release one.
  • 0211ff0d: Issue109289_Workaround was gated NETCoreSdkVersion.StartsWith('9.0.') in the old WASM head. Consolidation silently dropped that gate, turning dead code into a live target rewriting emcc link args on every WASM build. Correct fix: remove the target entirely. Verified with a WasmBuildNative=true build.
  • 4a944b08: Spec appendix "Non-obvious wiring decisions" is a clean, accurate reference for each moved comment. The two comment corrections (UnoRuntimeIdentifier scope, ordering constraints) are factually correct. Verified inert.

All prior-round findings — resolved

# Severity Finding Resolution
1 Medium iOS/tvOS TFMs missing Apple version suffix ✅ c0c1b3b9 via $(NetCurrentAppleOSVersion)
2 Medium ApplicationId not set for Android TFM ✅ fb317e175f
3 Medium Info.plist / LinkerConfig.xml / app.manifest stale old-head names ✅ 7d83ea1c
4 Low Permissions fragmented across two Android files ✅ 66c605c3b8
5 Low args silently dropped in Program.cs ✅ Documented 66c605c3b8
6 Low plan.md references private tooling identifiers ✅ 0687c8d6
7 Low environment.conf BOM + HTTP URL ✅ c4485e21
8 Low Unused using directives in Android files ✅ 1110e049
9 Low #nullable enable missing in Android files ⏭️ Declined — verbatim moves; annotation pass out of scope
10 Low BSD-3-Clause block in constructor body ⏭️ Declined — legally required notice

Remaining cross-cutting concern

The CI run (build 222277) reported 73 Linux + 83 Windows screenshot differences. These predate the current commits and need to be reviewed in the Screenshots Compare test run; baselines should be accepted or corrected before merge.

Validation: Code review (diff inspection) and local file reads. _AdjustedOutputProjects removal logic verified against build-system.md ("the list exists for folders holding several project variants"). _Platform ordering verified against the windows collapse. bin/SamplesApp.app on line 59 of .azure-devops-tests-ios-skia-build.yml confirmed as a destination artifact path, not a source path. No local compile or runtime execution — build-infra changes; CI pipelines are the authoritative gate.

@MartinZikmund

Copy link
Copy Markdown
Member Author

Follow-up cleanup deferred from this PR is tracked in #24045 (Uno.Sdk defaults the head restates, the tvOS single-project gap, the stale SamplesApp.Windows manifest reference, and deleting the four old heads).

@unodevops

Copy link
Copy Markdown
Contributor

NativeApplication became abstract on feature/breakingchanges, replacing the
app-factory constructor argument with a CreateHost() contract. The old
netcoremobile head was migrated with it; this head was created in parallel and
the rebase carried the new base class without updating it, so net10.0-android
has not compiled since:

  Main.Android.cs(27,15): error CS0534: 'Application' does not implement
  inherited abstract member 'NativeApplication.CreateHost()'

Adopts the same shape as SamplesApp.Skia.netcoremobile: the base constructor
takes only the JNI handle, and the app factory moves into CreateHost() via
UnoPlatformHostBuilder. That also defers host creation to first activity start,
which is what the new base class expects, so ContextHelper.Current is populated
by then.

Compile-validated: net10.0-android builds clean, and the generated
AndroidManifest.xml registers the Application ACW as before. Not runtime-
validated -- no emulator available here; the android runtime-test stage covers it.

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

github-actions Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 10s —— View job


PR Review — Consolidate SamplesApp into Uno.Sdk head

  • Gather context and understand the request
  • Check new commits since last review (7efb78bf)
  • Read key changed files (Main.Android.cs, NativeApplication base class)
  • Analyze for remaining or new issues
  • Post inline review comments (no new issues — none to post)
  • Update summary comment

Overall verdict

The single new commit (7efb78bf) is a clean, targeted fix. No new findings from this commit. All prior-round findings remain resolved.

New-commit notes (no new findings)

  • 7efb78bf (fix(samplesapp): Migrate the android head to the UnoPlatformHostBuilder): Correct fix for the Android build error that entered with the rebase onto feature/breakingchanges. NativeApplication became abstract on that branch, replacing the constructor-injected app factory with a CreateHost() contract (protected abstract UnoPlatformHost CreateHost()). The old netcoremobile head was migrated with that change; this new head was created in parallel so the rebase silently dropped it into a non-compiling state.

    The fix adopts exactly the same shape as SamplesApp.Skia.netcoremobile/Android/Main.Android.cs (verified on disk): the base constructor receives only (javaReference, transfer), and CreateHost() returns UnoPlatformHostBuilder.Create().App(() => new App()).UseAndroid().Build(). The deferral to CreateHost() is semantically correct — the base class calls it from OnActivityStarted (via ActivityCallbacks), at which point ContextHelper.Current is already set. No UI work was inadvertently moved to OnCreate().

    The two added using directives (Uno.UI.Hosting for UnoPlatformHost / UnoPlatformHostBuilder, Uno.UI.Runtime.Skia.Android for .UseAndroid()) are exactly what the builder requires. Clean.

Resolved findings (full history)

# Severity Finding Resolution
1 Medium iOS/tvOS TFMs missing Apple version suffix ✅ c0c1b3b9 via $(NetCurrentAppleOSVersion)
2 Medium ApplicationId not set for Android TFM ✅ fb317e175f
3 Medium Info.plist / LinkerConfig.xml / app.manifest stale old-head names ✅ 7d83ea1c
4 Low Permissions fragmented across two Android files ✅ 66c605c3b8
5 Low args silently dropped in Program.cs ✅ Documented 66c605c3b8
6 Low plan.md references private tooling identifiers ✅ 0687c8d6
7 Low environment.conf BOM + HTTP URL ✅ c4485e21
8 Low Unused using directives in Android files ✅ 1110e049
9 Low #nullable enable missing in Android files ⏭️ Declined — verbatim moves; annotation pass out of scope
10 Low BSD-3-Clause block in constructor body ⏭️ Declined — legally required notice

Remaining cross-cutting concern

The CI run (build 222277) reported 73 Linux + 83 Windows screenshot differences. These predate the current commit and need to be reviewed in the Screenshots Compare test run; baselines should be accepted or corrected before merge.

Validation: Code review (diff inspection) and local file reads. NativeApplication.CreateHost() signature (protected abstract UnoPlatformHost CreateHost()) verified in Uno.UI.Runtime.Skia.Android. Constructor call timing verified against OnActivityStarted in the base class. Result matches SamplesApp.Skia.netcoremobile/Android/Main.Android.cs (byte-for-byte equivalent pattern). No local compile or runtime execution — build-infra changes; CI pipelines are the authoritative gate.

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund
MartinZikmund merged commit 3476ec2 into feature/breakingchanges Aug 11, 2026
66 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/samplesapp-unosdk branch August 11, 2026 14:56
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 kind/documentation platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants