Repository navigation
Open
Labels
area/sdkCategorizes an issue or PR as relevant to the Uno.Sdkarea/svgCategorizes an issue or PR as relevant to SVG renderingkind/bugSomething isn't workingkind/regressionSomething was working, now it isn'tplatform/desktop 🖥️Categorizes an issue or PR as relevant to Desktop
Description
What happens
With Uno.Sdk 7.0.5 and the Svg UnoFeature, SVG images don't load on desktop. Parsing an SVG fails with:
FileNotFoundException: Could not load file or assembly 'Svg.Skia, Version=5.2.3.0, Culture=neutral, PublicKeyToken=dafe96fe6c845a74'.
What should happen
SVG images load and render, as with the managed SVG engine.
Steps to reproduce
dotnet new unoapp -preset blank -tfm net10.0 -platforms desktopwith Uno.Templates 7.0.5 (Uno.Sdk 7.0.5).- Add
Svgto<UnoFeatures>. - Show an SVG (for example an
Imagewith anSvgImageSource), and run the desktop head.
Environment
Desktop (net10.0-desktop, Windows), Uno.Sdk 7.0.5 / Uno.WinUI 7.0.32. Reproduces every time. Android, iOS and WebAssembly not tested.
Notes
- Cause:
Uno.UI.Svg.dllin Uno.WinUI.Svg 7.0.32 is compiled against Svg.Skia 5.2.3 (chore(deps): Bump Svg.Skia to 5.2.3 #25903), but the Uno.Sdk 7.0.5 manifest still pinsSvgSkiato 3.0.6, and the Uno.WinUI.Svg nuspec floor is still 3.0.6. .NET doesn't load an assembly older than the one referenced, so the app ships Svg.Skia 3.0.6.0 and the load of 5.2.3.0 fails. The exception is thrown beforeSkiaSvgRenderer.Parse's try/catch runs, so it reaches the caller. - Checked: in a 7.0.5 app with the
Svgfeature,SkiaSvgRenderer.Parsethrows the error above. With<SvgSkiaVersion>5.2.3</SvgSkiaVersion>in the project, the same call parses the SVG. - Workaround until the fix ships: set
<SvgSkiaVersion>5.2.3</SvgSkiaVersion>in the app project. - Fix: raise the Uno.WinUI.Svg nuspec floor to 5.2.3 (chore(sdk): Bump Uno.Sdk.Private versions behind the 7.0 stables and SkiaSharp 4.156.0 (backport #26165) #26322 for 7.0, chore(sdk): Bump Uno.Sdk.Private versions behind the 7.0 stables and SkiaSharp 4.156.0 (master) #26325 for master), and move the uno.templates
SvgSkiapin to 5.2.3 in the same Uno.Sdk version. Moving only the floor makes Android/iOS restores fail with NU1605 (Svg.Skia downgrade). - Related: The Svg feature pins Svg.Skia 3.0.6, so apps that reference a newer Svg.Skia fail restore with NU1605 #24984 (restore side, fixed by chore(deps): Bump Svg.Skia to 5.2.3 #25903), [SVG] TypeLoadException with Uno.Sdk 6.2.29: SVGs fail to render #21372 (same kind of break in 6.2).
Metadata
Metadata
Assignees
Labels
area/sdkCategorizes an issue or PR as relevant to the Uno.Sdkarea/svgCategorizes an issue or PR as relevant to SVG renderingkind/bugSomething isn't workingkind/regressionSomething was working, now it isn'tplatform/desktop 🖥️Categorizes an issue or PR as relevant to Desktop
Activity
fix(svg): Require Svg.Skia 5.2.3, the version Uno.UI.Svg is built aga…
fix(svg): Require Svg.Skia 5.2.3, the version Uno.UI.Svg is built aga…
ci: Drop the Svg.Skia exception and compare manifest pins per target …
ci: Drop the Svg.Skia exception and compare manifest pins per target …