Skip to content

[3.119.x] Fix WinUI Projection DLL not resolved for .NET 9 consumers on Windows#4086

Merged
mattleibow merged 1 commit into
release/3.119.xfrom
mattleibow/issue-4082-fix-3.119.x
May 29, 2026
Merged

[3.119.x] Fix WinUI Projection DLL not resolved for .NET 9 consumers on Windows#4086
mattleibow merged 1 commit into
release/3.119.xfrom
mattleibow/issue-4082-fix-3.119.x

Conversation

@mattleibow

Copy link
Copy Markdown
Collaborator

Summary

Backport of #4084 to release/3.119.x.

Fixes #4082SkiaSharp.Views.WinUI.Native.Projection assembly not found at runtime on Windows for .NET 9 apps (v3.119.4+).

Root Cause

When TFMCurrent moved to net10.0, the NuGet package placed the Projection DLL only in runtimes/win-{arch}/lib/net10.0-windows10.0.19041.0/. NuGet won't serve a net10.0 asset to a net9.0 consumer, causing FileNotFoundException at runtime.

Fix

Include the Projection DLL in all supported Windows TFM folders (both WindowsTargetFrameworksCurrent and WindowsTargetFrameworksPrevious), so both .NET 9 and .NET 10 consumers can resolve it.

The NativeAssets.WinUI package placed the Projection DLL only in the
net10.0-windows folder (WindowsTargetFrameworksCurrent). Since NuGet
won't serve a higher TFM asset to a lower TFM consumer, .NET 9 apps
couldn't resolve the assembly at runtime, causing FileNotFoundException.

Fix by including the Projection DLL in ALL supported TFMs (both Current
and Previous), ensuring every consumer TFM gets the assembly. This
mirrors the pattern where lib/ placeholders exist for each TFM.

Fixes #4082

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4086

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4086"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4086/packages --name skiasharp-pr-4086
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-4086

@mattleibow
mattleibow merged commit c462f87 into release/3.119.x May 29, 2026
2 of 3 checks passed
@mattleibow
mattleibow deleted the mattleibow/issue-4082-fix-3.119.x branch May 29, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant