Skip to content

Backport PR 3798 Fix Apple platform TFMs to use 26.0 for libraries and unversioned for apps - #4579

Merged
mattleibow merged 2 commits into
mono:release/3.119.xfrom
drasticactions:dev/timill/pr-3798-backport
Aug 3, 2026
Merged

mattleibow merged 2 commits into
mono:release/3.119.xfrom
drasticactions:dev/timill/pr-3798-backport

Conversation

@drasticactions

Copy link
Copy Markdown

This is a backport of #3798 to the SkiaSharp 3.x branches. This was fixed in 4.x builds, but Avalonia and Uno depend on 3.x SkiaSharp for our stable products. As a result, native libraries won't resolve unless a user has either bumped their builds to 26.2, we bump our minimum builds to 26.2, or you include the libraries yourself within your project and don't resolve them transitively via nuget.

Fixes #4031, and addresses the issues Uno also hit with their platforms (CC @agneszitte).

…mono#3798)

Fix Apple platform TFMs: use 26.0 for libraries, unversioned for apps (mono#3798)

Fixes: mono#3514 (regression)

The .NET 10 upgrade in mono#3514 set the Apple Target Platform Versions to
26.2 (matching the CI's Xcode version) instead of 26.0 (the base Xcode 26
unified SDK version). This caused library NuGet packages to ship with
TFMs like `net10.0-ios26.2`, forcing consumers to install Xcode 26.2
rather than accepting any 26.x workload.

The same PR also accidentally added explicit TPVs to the
`MauiTargetFrameworksApp` properties, which were originally introduced
in 40b0f57 with no TPV so that apps pick up whatever workload is
installed on the build machine.

The fix splits the versioning strategy:

  * Libraries pin to the `.0` TPV (`net10.0-ios26.0`) for maximum
    compatibility — consumers need only the base workload.
  * Apps (test devices, samples) use unversioned TFMs (`net10.0-ios`)
    so they build against whatever Xcode is on the CI agent or dev
    machine, avoiding SDK/Xcode version mismatches.

Files changed:

  * `source/SkiaSharp.Build.props` — Apple TPVs 26.2 → 26.0;
    `MauiTargetFrameworksApp` restored to unversioned
  * `build.cake` — test task TFMs to unversioned
  * `scripts/VERSIONS.txt` — ref pack names and versions to 26.0
  * `scripts/cake/UpdateDocs.cake` — ref pack package names to 26.0

Verified: all 15 Apple-platform NuGet packages contain `26.0` TFMs.
iOS and Mac Catalyst CI tests pass with Xcode 26.2 installed.

Co-authored-by: Matthew Leibowitz <[email protected]>
Co-authored-by: Copilot <[email protected]>
(cherry picked from commit 9981d30)
@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 -- 4579

PowerShell / Windows:

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

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4579/packages --name skiasharp-pr-4579
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-4579

@mattleibow

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
No pipelines were found matching this branch/path.

PR mono#3798 changed MauiTargetFrameworksApp* to use unversioned Apple and
Android TFMs, so SkiaSharp.Tests.Devices now restores as net10.0-android
rather than net10.0-android36.0. That PR updated the tests-ios and
tests-maccatalyst tasks in build.cake to match, but left tests-android
pinned to the old versioned TFM, so the Android device tests failed at
restore:

  NETSDK1005: Assets file '.../SkiaSharp.Tests.Devices/obj/project.assets.json'
  doesn't have a target for 'net10.0-android36.0'.

The same breakage landed on main and went unnoticed for about a week
until mono#3826 refactored tests-android into
scripts/infra/tests/tests-android.cake and incidentally wrote the correct
unversioned TFM. That refactor is not on release/3.119.x, which still has
the inline task, so the backport reproduced the original gap with no
accidental fix to cover it.

Point the task at net10.0-android so the TargetFramework build property
and the resulting APK output path both line up with what the project
actually targets.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 65f26eb1-8025-4a6b-a627-a18c13929769
@mattleibow

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
No pipelines were found matching this branch/path.

@mattleibow
mattleibow merged commit c3f7ff8 into mono:release/3.119.x Aug 3, 2026
3 checks passed
@agneszitte

agneszitte commented Sep 2, 2026 •

Copy link
Copy Markdown

 Fixes #4031, and addresses the issues Uno also hit with their platforms (CC @agneszitte).

@drasticactions, @mattleibow
Thank you a lot for the backport but I don't think I am seeing a new 3.119.x with the inclusion available and #4031 is still open as well
Thanks in advance for the feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants