Repository navigation
fix(sdk): align Linux SkiaSharp native asset on desktop - #23659
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
|
Claude finished @MartinZikmund's task in 3m 10s —— View job Review complete
Verdict: LGTM — clean fix, no blocking issues. What was reviewed:
Observations:
Minor (non-blocking): The XML comment is four lines, which is on the verbose side for a No inline issues to report. |
|
@Mergifyio backport release/stable/6.6 |
✅ Backports have been createdDetails
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 |
There was a problem hiding this comment.
Pull request overview
Fixes a NuGet resolution gap in the Uno.Sdk desktop (Skia) implicit-package injection so that overriding SkiaSharpVersion also retargets the Linux native libSkiaSharp.so package, preventing a silent managed/native ABI mismatch on Linux desktop heads.
Changes:
- Inject
SkiaSharp.NativeAssets.Linuxas an implicit package for executablenet*-desktopheads (alongside the existing X11/FrameBuffer runtime packs). - Add an explanatory comment documenting the NuGet behavior/root cause and why the injection is needed.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
|
Added a CI regression guard (2nd commit): the Linux template-app job now restores the |
|
Claude finished @MartinZikmund's task in 2m 7s —— View job Review complete
Verdict: LGTM — clean fix, no blocking issues found. What was reviewed (2nd commit additions)
Observations on the regression guard
Non-blocking note: The No inline issues to report. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23659/wasm-skia-net9/index.html |
|
Tick the box to add this pull request to the merge queue (same as
|
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]>
…6.6/pr-23659 fix(sdk): align Linux SkiaSharp native asset on desktop (backport #23659)

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 ✅