Skip to content

The Svg feature pins Svg.Skia 3.0.6, so apps that reference a newer Svg.Skia fail restore with NU1605 #24984

Closed

Description

@MartinZikmund

Current behavior 🐛

The Svg UnoFeature adds an implicit Svg.Skia package reference pinned to 3.0.6 (SvgSkia group in src/Uno.Sdk/packages.json, still 3.0.6 on current master). Svg.Skia is now at 5.2.3 on nuget.org.

If the app (transitively, through a library) references a newer Svg.Skia, restore fails:

error NU1605: Warning As Error: Detected package downgrade: Svg.Skia from 4.3.0 to 3.0.6.
 App -> Lib -> Svg.Skia (>= 4.3.0)
 App -> Svg.Skia (>= 3.0.6)

Any app/library that uses Svg.Skia directly (for example to rasterize SVG into SkiaSharp itself) cannot enable Svg without an explicit override.

On master the pin is also well behind the rest of the Skia stack: SkiaSharp is 4.151.1 (src/Directory.Packages.props), while Svg.Skia 3.0.6 depends on SkiaSharp >= 2.88.9. I did not test whether that combination misbehaves at runtime; the SamplesApp builds with it.

Expected behavior 🎯

The implicit Svg.Skia version should track a current release so common apps don't hit NU1605 (and ideally align with the SkiaSharp major used by Uno). Svg.Skia 4.x/5.x also changed its asset-loader API (see the closed #21372 and #21378), so a bump needs the Uno.UI.Svg add-in re-validated against the new version.

How to reproduce it (as minimally and precisely as possible) 🔬

  1. Create lib/Lib.csproj:
    <Project Sdk="Microsoft.NET.Sdk">
      <PropertyGroup><TargetFramework>net10.0</TargetFramework></PropertyGroup>
      <ItemGroup><PackageReference Include="Svg.Skia" Version="4.3.0" /></ItemGroup>
    </Project>
  2. Create global.json with { "msbuild-sdks": { "Uno.Sdk": "6.7.22" } } and App.csproj:
    <Project Sdk="Uno.Sdk">
      <PropertyGroup>
        <TargetFrameworks>net10.0-desktop</TargetFrameworks>
        <OutputType>Exe</OutputType>
        <UnoFeatures>Svg</UnoFeatures>
      </PropertyGroup>
      <ItemGroup>
        <ProjectReference Include="lib\Lib.csproj" />
      </ItemGroup>
    </Project>
  3. Run dotnet restore App.csproj. NU1605 as above (runtime-backed, Uno.Sdk 6.7.22).

Note: referencing Svg.Skia directly from the app head (instead of transitively) restores fine, because the explicit reference wins over the implicit one.

Workaround

Set the existing SDK property, e.g. <SvgSkiaVersion>4.3.0</SvgSkiaVersion> in the head's csproj (verified: restore succeeds with the repro above), or reference Svg.Skia directly from the head. SVG rendering with a newer Svg.Skia was only checked on the Skia desktop head by the original reporter.

Works on UWP/WinUI

N/A (Uno SDK packaging).

Environment

Uno.Sdk 6.7.22 (restore repro); the 3.0.6 pin is unchanged on master bfc8dffd7fe.

NuGet package version(s) affected

Uno.Sdk 6.4.42 (first seen), 6.7.22 (reproduced), master.

Affected platforms

Skia heads (desktop reproduced; the pin applies to every head using the Svg feature)

IDE

CLI (dotnet restore)

Relevant plugins

No response

Anything else we need to know? 💬

Where the pin lives on master:

Related, same family but not a duplicate: #24259 (SkiaSharp 3.x pins vs apps on SkiaSharp 4.x).

Activity

  1. added
    kind/bug
    triage/untriaged
    kind/dependency
    difficulty/medium 🤔
    area/svg
    area/sdk
    on Oct 5, 2026
  2. added
    7.0
    on Oct 14, 2026
  3. removed
    triage/untriaged
    7.0
    on Oct 29, 2026
  4. self-assigned this
    on Nov 1, 2026
  5. added 2 commits that reference this issue on Nov 2, 2026
    c49c2f7
    319b5f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/sdkarea/svgdifficulty/medium 🤔kind/bugkind/dependency

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions