Repository navigation
fix(sdk): align Linux SkiaSharp native asset on desktop (backport #23659) - #23663
Merged
agneszitte merged 3 commits intoJul 6, 2026
Merged
Conversation
The base SkiaSharp package auto-references its Win32/macOS native assets but not the Linux one, so overriding SkiaSharpVersion on a Skia Desktop head left SkiaSharp.NativeAssets.Linux at the transitive floor from the X11/FrameBuffer runtime packs — a silent managed/native mismatch that crashed Skia Desktop on Linux at startup. Inject it as an implicit package for executable desktop heads so SkiaSharpVersion retargets it, mirroring how the legacy FrameBuffer head and SkiaSharp's own Win32/macOS dependencies already behave. fixes #23658 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_018xXm9Kn9hR9vXncVvjPQnT (cherry picked from commit a973552) # Conflicts: # src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.Desktop.targets
Add a regression check to the Linux template-app job: restore the net10.0-desktop template head with an overridden SkiaSharpVersion and assert SkiaSharp.NativeAssets.Linux resolves to the same version as managed SkiaSharp. Fails before the SDK injection fix, passes after. refs #23658 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_018xXm9Kn9hR9vXncVvjPQnT (cherry picked from commit 4b8328d)
Contributor
Author
|
Cherry-pick of a973552 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
1 of 3 tasks
Keep 6.6's WPF RDP hardware-acceleration RuntimeHostConfigurationOption alongside the SkiaSharp.NativeAssets.Linux injection backported from #23659. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
GitHub Issue: closes #23658
PR Type:
🐞 Bugfix
What changed? 🚀
On a Skia Desktop single-project head (
net*-desktop), overriding<SkiaSharpVersion>above the version the Uno.Sdk ships did not retargetSkiaSharp.NativeAssets.Linux. ManagedSkiaSharpand the Win32/macOS native assets moved to the requested version, but the Linux nativelibSkiaSharp.sostayed at the transitive floor referenced by theUno.WinUI.Runtime.Skia.X11/Uno.WinUI.Runtime.Skia.Linux.FrameBufferruntime packs — a silent managed/native ABI mismatch that crashed Skia Desktop on Linux at startup (no build or restore diagnostic).Root cause: the base
SkiaSharppackage auto-depends onSkiaSharp.NativeAssets.Win32and.macOS(in every desktop/generic TFM group, at its own version), so those self-align on a managed bump — but it has noSkiaSharp.NativeAssets.Linuxdependency in any group (Linux native is opt-in). Meanwhile the Uno.Sdk only injected the Linux native asset for the legacy*.Skia.Linux.FrameBufferhead, never for the modern single-project desktop head. With no top-level reference to bind to,SkiaSharpVersion(and the documentedPackageReference Updatefallback) had nothing to retarget, so the transitive floor won.Fix: inject
SkiaSharp.NativeAssets.Linuxas an implicit package for executable desktop heads — in the same$(_IsExecutable)item group that already pulls the X11/FrameBuffer runtime packs. Because the package is already part of the Uno.SdkSkiaSharpversion group,SkiaSharpVersionnow retargets it in one place, making the Using the Skia Desktop docs' promise actually hold, and mirroring both the legacy FrameBuffer head and SkiaSharp's own Win32/macOS behavior. This also aligns the default (non-overridden) case, where the Linux native previously resolved one patch below managed.Validation:
Uno.WinUI.Runtime.Skia.X11 6.5.237+SkiaSharp 4.148.0project resolves managed +NativeAssets.Win32+NativeAssets.macOSto4.148.0whileNativeAssets.Linuxstays at3.119.0, with no restore warning/error. Adding a top-levelSkiaSharp.NativeAssets.Linux 4.148.0reference — exactly what this change injects — realigns it to4.148.0.Uno.Implicit.Packages.ProjectSystem.Legacy.targetspattern, andImplicitPackagesResolveralready routesSkiaSharpVersioninto theSkiaSharpgroup so the injected reference is emitted at the overridden version.PR Checklist ✅
This is an automatic backport of pull request #23659 done by [Mergify](https://mergify.com).