Repository navigation
Build, package and template the Tizen backend - #10
Merged
Merged
Conversation
Redth
added a commit
that referenced
this pull request
Aug 26, 2026
…policy Ten further review findings. All were real; several were things that looked correct while doing nothing. Blazor package graph (verified against the feed, not assumed) Microsoft.AspNetCore.Components.WebView was pinned to MAUI's version stamp 11.0.0-preview.7.26418.3. That version does not exist for that package - it is an ASP.NET Core package on its own version line - so NuGet silently substituted 11.0.0-rc.1.26378.118 (NU1603) and then failed with NU1109 downgrades across the graph. That substitution is where the "actual dependency is rc.1" report came from; it was NuGet's fallback, not a declared dependency. Microsoft.AspNetCore.Components.WebView.Maui 11.0.0-preview.7.26418.3 declares Microsoft.AspNetCore.Authorization, Microsoft.AspNetCore.Components.WebView and Microsoft.JSInterop at exactly 11.0.0-preview.7.26381.103 - which also matches the SDK build pinned in global.json, so the whole graph stays on one ASP.NET Core build. Pinned there. RC1 would have silently upgraded past what MAUI asked for. Package source mapping now lists the prerelease patterns under BOTH sources. NuGet restores only from sources declaring the longest matching pattern, so Microsoft.AspNetCore.* under dotnet11 alone would have made every ASP.NET Core package resolvable only from that feed (NU1100 for anything it lacks). Added eng/tests/PackageGraphProbe: a net11.0 project whose only purpose is to make restore prove these pins resolve. Necessary because the real consumers are Tizen projects, and they cannot restore at all - the workload gate fires before Restore - so a broken pin would otherwise stay invisible until Samsung ships. Verified it reproduces the original NU1603/NU1109 failure. CI workload probe could never succeed (#5) `dotnet workload install tizen --skip-manifest-update` cannot work on a clean runner: the Samsung manifest is third-party and side-loaded, so the workload ID is not discoverable through public workload search, and --skip-manifest-update guarantees failure because the manifest is exactly what is missing. A probe that can never succeed would keep reporting "blocked" for weeks after the gate lifts. Replaced with a feed probe for an 11.0.100-band manifest package, checking both ID spellings. Installation, when it happens, goes through Samsung's supported path. Dead configuration removed (#6, #10) - <Compile Update="**/*.Tizen.cs" /> had no metadata, so it changed nothing, and EnableDefaultCompileItems=false meant there were no items to update anyway. It read as meaningful configuration while being unreachable. - ValidateBaselineConsistency did substring matching on JSON inside MSBuild. Parsed validation already exists in the workload-free script and the invariant tests, which is where it belongs. Orphan imported projects (#7) GraphicsTester.Skia.Tizen.csproj was imported because its filename contains "Tizen", but it cannot load here: its TFM is $(_MauiDotNetTfm)-tizen (a dotnet/maui property that does not exist here, so the TFM evaluates to the malformed "-tizen") and both ProjectReferences point at projects never imported. Parked as .csproj.orphan - file and history intact, invisible to project discovery - with samples/README.md documenting every orphan asset directory and an invariant test asserting every .csproj is in the solution. Analyzers and warnings (#8, #14) - Added Microsoft.CodeAnalysis.PublicApiAnalyzers (PrivateAssets=all) so the PublicAPI baselines are enforced rather than inert text. - Removed the Microsoft.SourceLink.GitHub pin; the SDK has bundled it since .NET 8. - Suppressed CS1591 in TizenPackage.props: the inherited sources are not uniformly documented, so the first project to start compiling would otherwise fail on hundreds of missing-comment errors under warnings-as-errors. Documentation is its own workstream, not a blocker for the first handler. Licensing (#9) git-filter-repo is vendored and load-bearing, so unlike the referenced-only Samsung packages it IS redistributed. Added its upstream, version, MIT licence text and a verification command to THIRD-PARTY-NOTICES.md. CI hygiene (#11, #12) - `dotnet test --no-build` is skipped when a preceding build failed; running it against missing output buries the actual first failure in cascading noise. - Added a scheduled dependency-audit workflow. The strict policy stays (audit at `low`, warnings as errors - this ships to devices where patching is slow), but a newly published advisory now files an issue weekly instead of ambushing whoever opens the next unrelated PR. Suppression process documented, with a required justification and re-review date. Naming and provenance (#13) Replaced 'samsung.net.sdk.tizen.manifest-11.0.100' with the actual band contract Samsung.NET.Sdk.Tizen.Manifest-11.0.100-preview.7, recording both ID spellings (NuGet IDs are case-insensitive) and the probe results for each. Documented that tizen11.0/API15 comes from Samsung workload PR #310 - verified, not assumed. Also recorded that enabling Build.Tasks raises real SkiaSharp native-asset packaging questions, flagged as an open decision rather than papered over. Tests: 28 -> 33 invariants, plus the package graph probe wired into the required lane. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Compiles src/Maui.Tizen.Build.Tasks and src/Maui.Tizen.Templates, which the
foundation import left as shape-only skeletons, and adds the buildTransitive layer
that turns single project resources into TPK inputs.
The foundation recorded an open question for Build.Tasks: the three imported Tizen
task files depend on ILogger / ResizeImageInfo / ResizedImageInfo, shared Resizetizer
infrastructure the path filter correctly excluded. Neither recorded option (vendor
them, or ship these tasks inside Microsoft.Maui.Resizetizer) is taken. The tasks are
ported onto the public Resizetizer contract from dotnet/maui PR 36653 instead:
* ResizetizerPlatformType opts this backend into the processing pipeline
* MauiProcessedImage / MauiProcessedFont / MauiProcessedAsset expose outputs
* ResizetizerAfterImage/Font/AssetProcessingTargets are the packaging hooks
Nothing upstream is forked, and the tasks stay in this repository. Platforms/Tizen is
registered through MauiPlatformSpecificFolder using the recognized 'tizen'
TargetPlatformIdentifier, not neutral-TFM backend activation metadata.
The externalized generators stay inert while the Resizetizer still carries its
built-in Tizen branches, and take over automatically once those are removed upstream.
NATIVE SKIASHARP IN THE TASK HOST
SkiaSharp declares plain [DllImport("libSkiaSharp")] entry points and ships no loader
of its own, so resolution falls back to probing driven by the host application's
dependency context - here MSBuild, which knows nothing about SkiaSharp. A task
assembly loaded through UsingTask AssemblyFile= gets no native probe path at all, and
netstandard2.0 libraries do not copy runtimes/** to their output, so there was no
binary to find. Every failure surfaced as the same unhelpful message:
error : The type initializer for 'SkiaSharp.SKData' threw an exception.
SkiaSharpHost registers an explicit resolver probing the three layouts this repository
produces (flat, architecture sub-folder, runtimes/{rid}/native), and the build copies
the host's own binary next to the task assembly. On .NET Framework MSBuild - Visual
Studio and MSBuild.exe - there is no NativeLibrary at all, so the binary is preloaded
through the OS loader instead; without that a Visual Studio build fails while the same
project builds from the command line, because the Windows natives ship only in
architecture sub-folders that are on no default search path.
The Linux binary additionally comes from SkiaSharp.NativeAssets.Linux.NoDependencies,
because the default build links libfontconfig.so.1, which is absent from the dotnet/sdk
images. Microsoft.Maui.Resizetizer ships the same dependency-free build for the same
reason. The host binary is now selected from the host's runtime identifier rather than
a composed "linux-{arch}", so musl distributions get the musl build instead of a glibc
one that cannot load.
BLAZOR STATIC WEB ASSET HANDOFF
MauiTizenAssetProviderTargets is a documented seam for packages that contribute
MauiAsset items; registering through it guarantees ordering relative to Tizen asset
processing without knowing any Resizetizer target names. Tizen resources are now
de-duplicated by destination, so two providers contributing one file cannot pack it
twice. eng/contracts/ carries a working reference implementation for
Maui.Tizen.BlazorWebView, tested here so it cannot drift, but owned and shipped by that
package. It is needed because Microsoft.AspNetCore.Components.WebView.Maui ships its
equivalent conversion under build/, which NuGet does not flow transitively, so an app
referencing a wrapper package never receives it.
OTHER REVIEW FIXES
* The template conditioned its Tizen package references on $(TargetPlatformIdentifier),
which the SDK does not set until after the project body is evaluated, so every
generated app silently omitted Maui.Tizen, Build.Tasks and the API15 reference pack.
* The template's application id was a fixed literal, so two generated apps collided on
a device. It is now derived from the project name, sanitized to what Tizen accepts,
and still overridable.
* ComputeTizenResourceLayout anchored on the FIRST res/shared path segment, so a
checkout under /mnt/shared misplaced every resource. It now anchors on the innermost
recognized layout and is constrained to the build output directory.
* The splash screen incremental check trusted only tizen-splash.map, so deleting one
generated PNG left the build believing it was up to date and produced a TPK with a
missing splash screen. Every mapped image is now verified before the skip.
Validation: eng/build-workload-free.sh green on macOS arm64, Linux x64 (the CI
architecture) and Linux arm64, including 179 tests. eng/run-linux-checks.sh runs the
lane in a container so the Linux path is reproducible locally, which is how the
SkiaSharp defects were found. Tests cover template instantiation and evaluation, the
Blazor handoff end to end against the real Razor SDK and WebView package, ELF
dependency parsing so fontconfig cannot return, per-OS and per-architecture package
layout, and incremental healing.
TPK packaging, signing, deployment and launch remain owned by the Samsung workload,
which is still an external gate; nothing here fakes it.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Redth
force-pushed
the
redth-tizen-build-pipeline
branch
from
August 26, 2026 22:27
b1f9eac to
67bf7d1
Compare
Maui.Tizen.BlazorWebView now ships the StaticWebAsset -> MauiAsset conversion itself (PR #6, 5f9894a), so the copy carried here as a reference implementation would be a second source of truth for a file this package does not own. It moves to tests/UnitTests/fixtures/ and is documented as a stand-in for "some package registers an asset provider". The tests it backs still cover this side of the boundary - the MauiTizenAssetProviderTargets seam, MauiProcessedAsset -> TizenResource, res/wwwroot layout and de-duplication by destination - without depending on another package's sources. Also answers, with a test rather than an assertion in a message, whether Blazor content needs entries in res.xml: it does not. res.xml describes only the DPI-variant image buckets under res/contents, and web content is addressed by URL. Two independent things keep it out - assets travel as MauiProcessedAsset and never reach the generator, which is only handed MauiProcessedImage, and the generator separately only accepts folders whose parent is "contents". StaticWebAssetsAreNotDescribedInTheResourceManifest builds an app with both an image and web content and asserts the observable outcome, so neither mechanism can regress silently. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adds PackageShipsTheReadmeItDeclares, which asserts that every packable project's
declared PackageReadmeFile is actually present in the produced package - the exact
condition NU5039 checks.
The test deliberately asserts the OUTCOME rather than where the readme item is
declared, so it keeps protecting if that ItemGroup moves from Directory.Build.props to
Directory.Build.targets or is restructured.
On the reported NU5039 risk: measured, the current arrangement is correct and does not
produce NU5039. The readme ItemGroup lives in Directory.Build.props with a condition on
$(IsPackable), which each project sets in its own body, and that looks like it cannot
work because the props file is imported first. It works because MSBuild evaluates ALL
properties - across the project body and every import - before it evaluates ANY items.
A property assigned inside Directory.Build.props sees the pre-body value; an item
condition in that same file sees the final one.
Verified three ways rather than by inspection:
* both packages currently contain README.md and declare <readme> in their nuspec;
* a minimal repro shows a property snapshot in props reading 'false' while an item
condition in the same file reads 'true';
* deleting the ItemGroup reproduces NU5039 immediately, which also proves the new
test is not vacuous.
Moving the item to Directory.Build.targets would also work and is harmless, so this
does not block that change; the test passes either way.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Redth
added a commit
that referenced
this pull request
Aug 27, 2026
Relocates the README <None Pack="true"> ItemGroup from Directory.Build.props to Directory.Build.targets, so it is evaluated unambiguously after the project body has set $(IsPackable). To be accurate about what this does and does not fix: the .props placement was NOT broken. MSBuild evaluates all properties - across every import AND the project body - in an earlier pass than any item, so the ItemGroup condition already observed a project-body <IsPackable>true</IsPackable>. I verified this before and after by packing a project shaped exactly like PR #10's Build.Tasks and Templates (imports TizenPackage.props, opts into IsPackable in its own body): README.md is present in the nupkg and no NU5039 occurs in either arrangement. Moving it anyway, for a reason that is not "the bug was real": Two reviewers independently read the .props placement as an NU5039 defect. Both reasoned top-to-bottom, which is how almost everyone reads a build file. When correctness depends on recalling MSBuild's multi-pass evaluation order, it cannot be reviewed at a glance - and this is a one-line relocation with no behavioural downside. Subtle-but-right is worse than obviously-right when obviously-right is free. Added ReadmePackItemIsDeclaredAfterProjectEvaluation so it does not drift back, and left comments at both the old and new locations explaining the evaluation semantics, so the next reader does not have to re-derive them or re-file the finding. The behavioural guard remains eng/tests/PackReadmeProbe, which packs and asserts README.md is inside the nupkg - added at 3713c45, unchanged here. That is what actually protects this; the relocation protects the reviewer. Tests: 41 -> 42. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… into redth-tizen-build-pipeline
…estable Two robustness fixes found by running the workload-free lane on Linux. 1. The new README pack check reported a present README as missing. It shells out to `unzip`, which is not installed in the dotnet/sdk container images. A missing tool is indistinguishable from a missing README, so the check failed on Linux while the package it was inspecting did contain README.md - verified by reading the same archive another way. That is exactly the failure mode the note above the check warns about (a present thing reported missing), reintroduced through the tool rather than through the pipeline. It now reads the archive with python3, already a hard dependency of this script, and distinguishes "could not read the package" from "the package has no README" so a broken probe can never masquerade as a repository defect. The GitHub-hosted runner does have unzip, so this was not failing in CI - which is the point: the check was passing for a reason unrelated to what it asserts. 2. The desktop-framework Skia preload had no reachable test. PreloadForDesktopFramework runs only when NativeLibrary is absent, which on any host that can run these tests it never is, so the candidate-selection loop was covered nowhere. The selection is split into TryPreload, which returns the path it chose, with PreloadForDesktopFramework reduced to applying that result to shared state. Tests now exercise the real loop, including that a file which merely exists but is not loadable is skipped rather than accepted. This does not close the remaining gap: running MSBuild.exe itself still needs a Windows agent. It does mean the logic that runs there is no longer untested. eng/run-linux-checks.sh installs unzip alongside python3 so the container matches the CI runner, rather than diverging from it in a way that hides tool-shaped failures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…alls
Centralizes the MSBuild isolation every test process needs into
TestBase.ConfigureIsolatedMSBuild, and applies it at all three invocation sites
(generated project builds, template instantiation and evaluation, and packing).
By default the CLI reuses long-lived MSBuild worker nodes and an MSBuild server, both
shared machine-wide. A test process joins that pool and queues behind unrelated builds
owned by other sessions on the same machine, which presents as a test that hangs rather
than one that fails. The settings - -nodeReuse:false, -m:1 and
DOTNET_CLI_USE_MSBUILD_SERVER=0 - are now applied in one place so a new test cannot
quietly omit one.
Honest note on measurement: this machine is currently saturated by concurrent sibling
sessions (load average ~280-400), so the change cannot be cleanly timed here. The last
full run took 33m wall clock for 2m37s of user CPU, which says the time went to CPU
starvation rather than to anything this commit affects. The change is still correct -
these tests build tiny generated projects, so there is nothing for extra nodes or a
persistent server to accelerate, and not joining a shared pool removes a real hang.
Documentation adds two provider-authoring pitfalls reported from the BlazorWebView side:
* asset file names may be fingerprinted by the SDK (blazor.webview.js is declared
upstream as "blazor.webview#[.{fingerprint}]?.js"), so a hard-coded name produces an
item that looks right and resolves to nothing;
* .gz/.br AssetRole='Alternative' variants should be dropped, since a Tizen app serves
assets from local storage and shipping both is pure TPK bloat.
Both were already handled in the pipeline but undocumented, which is the gap that let
the first one be got wrong.
Also records that resources are absent from res.xml by design.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2ffcb0b8-8c5e-461b-a025-98e2f1391d83
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2ffcb0b8-8c5e-461b-a025-98e2f1391d83
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2ffcb0b8-8c5e-461b-a025-98e2f1391d83
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2ffcb0b8-8c5e-461b-a025-98e2f1391d83
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2ffcb0b8-8c5e-461b-a025-98e2f1391d83
Integrate the completed backend, Essentials, alerts, BlazorWebView, validation, and package gates while retaining Build.Tasks, templates, package provenance, and incremental-resource coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
Validate manifest placeholders against evaluated MauiIcon SVG inputs and remove the obsolete static platform PNG from the integrated sample. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
Make templates and samples consume MAUI build support explicitly, fix referenced splash incrementality and ownership, reject conflicting TPK resources, serialize Skia initialization, ship host diagnostics, and harden validation CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
Reject linked splash ownership paths, centralize map-owned cleanup for generation and disablement, make collision diagnostics portable, and validate the complete TPK resource namespace. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
Reject dangling splash-map links and normalize complete TPK destinations consistently for fresh and incremental splash outputs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
Collapse repeated mixed separators before comparing resource destinations so equivalent package paths cannot bypass conflict validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7a37339a-ace9-487d-b025-3262b9d414d9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on
redth-tizen-core-vertical-slice. Adds the standalone Tizen build, Resizetizer, TPK and template layer.What this resolves
The foundation import left
src/Maui.Tizen.Build.Tasksdeliberately non-compiling, with an open question recorded in its csproj: the three imported Tizen task files depend onILogger/ResizeImageInfo/ResizedImageInfo, shared Resizetizer infrastructure the path filter correctly excluded because none of those filenames contain "tizen". The two options noted were to vendor those upstream files, or to ship these tasks insideMicrosoft.Maui.Resizetizer.Neither is taken. The tasks are ported onto the public Resizetizer contract from dotnet/maui#36653, which exposes exactly what the shared types used to carry. Nothing upstream is forked, and the tasks stay here.
src/Maui.Tizen.Templatesis likewise enabled and now ships a real template.Package contract consumed
ResizetizerPlatformTypetizen, opting this backend into the processing pipelineMauiProcessedImageres.xmlMauiProcessedFontres/fontsMauiProcessedAssetLinktoTizenTpkFileNameand contributed asTizenResourceResizetizerAfterImage/Font/AssetProcessingTargetsPinned to
Microsoft.Maui.Resizetizer11.0.0-preview.7.26406.9, which is the version the installedmaui-tizenmanifest carries and is available on both nuget.org and thedotnet11feed.Forward compatibility
The externalized generators are inert while the Resizetizer still carries its built-in Tizen branches (
_ResizetizerIsTizenApp). They take over automatically once that stops being set upstream, so the built-in Tizen mappings can be deleted without a coordinated change here.MauiTizenUseBuiltInResizetizerSupportoverrides the probe.Platforms/Tizenis registered throughMauiPlatformSpecificFolderusing the recognizedtizenTargetPlatformIdentifier, not neutral-TFM backend activation metadata, because Tizen is a real target platform.Bugs found and fixed along the way
Microsoft.Maui.Resizetizer.dllis loaded into the same MSBuild process and registersGenerateTizenManifest. An unqualified<GenerateTizenManifest>binds to its task, silently producing a different manifest. Tasks are now invoked fully qualified. This is also why these types do not keep the upstream namespace, unlike thesrc/Maui.Tizen.*package projects.res.xmlpacked twice. The Resizetizer's own task emitsres.xmlforResizetizerPlatformType=tizenand publishes it throughMauiProcessedImage. It is now adopted rather than regenerated.staticfield, which does not survive a skipped target. The map is now persisted to disk.appiconxhigh.png; the Resizetizer writesappicon.xhigh.png. The port emits the real name.IntermediateOutputPathdoes not exist when packagebuildTransitiveprops are imported, so computing the generated-file folder there produced a stray project-relativemaui-tizen/. It is resolved at execution time.Validation
eng/build-workload-free.shis green, including 116 tests. The lane now also builds and packs both packable projects.MSBuild integration tests drive the real
buildTransitivefiles against the real Resizetizer package and cover:AfterMicrosoftNETSdkTargets, the SDK's final import)MauiImage/MauiAssetcollection, in both ordersres.xml, splash map and manifestres.xmlPackage-content tests pack for real and assert the shipped layout, including the flattened native SkiaSharp binaries and the absence of a
lib/folder.Samsung workload dependencies (external gate, unchanged)
TPK packaging, signing, deploy and launch remain owned by
Samsung.NET.Sdk.Tizen. Nothing here fakes them. This package only produces the inputs they consume:TizenTpkUserIncludeFiles,TizenResource,TizenTpkFileName,TizenTpkSubDirandTizenManifestFile, plusMauiTizenSigningProfile/MauiTizenSigningProfilesPathforwarding.Measured on this machine, SDK
11.0.100-preview.7.26381.103:Samsung.Tizen.Ref.API1515.0.0.19396is on nuget.org, but the workload manifest is not:https://tizen.myget.org/F/dotnet/...returnsUnauthorized, and nosamsung.*manifest exists in the SDK band.eng/build-workload-free.shreported "Samsung Tizen workload is installed" because it greppeddotnet workload listfortizen, which matches MAUI's emptymaui-tizenshim. The probe now checks for thesamsung.net.sdk.tizenmanifest instead, matchingDirectory.Build.props.Note for the reviewer
The parent commit is
2bcc347, the pushedredth-tizen-core-vertical-slicehead at branch time. That branch has since advanced locally; rebasing onto its new head is a clean fast-forward.Also worth reporting upstream: the Resizetizer deletes every image it has just written when the project path contains a symlink, because its stale-file glob and its task output disagree on the spelling. This bites any macOS build under
/tmpor/var/folders. The test harness canonicalizes paths and documents why.