Repository navigation
Backport PR 3798 Fix Apple platform TFMs to use 26.0 for libraries and unversioned for apps - #4579
Merged
mattleibow merged 2 commits intoAug 3, 2026
Conversation
…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)
Contributor
📦 Try the packages from this PRWarning 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 -- 4579PowerShell / 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-4579More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4579 |
Contributor
|
/azp run |
|
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
Contributor
|
/azp run |
|
Azure Pipelines: No pipelines were found matching this branch/path. |
mattleibow
approved these changes
Aug 3, 2026
@drasticactions, @mattleibow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).