build: cross-platform targeting for non-Windows builds + pinned Android platform versions#1582
Merged
glennawatson merged 2 commits intoMay 23, 2026
Merged
Conversation
Make the full target set buildable on Linux/macOS, not just Windows:
- Set EnableWindowsTargeting=true and drop the Windows-only gate on the
net462/net472/net481 legacy targets so they are always part of the build.
- Always include the net8/9/10 -windows TFMs in the UI projects' target set.
- Drop the IsOsPlatform('Windows') gate on Splat.Drawing's UseWPF/UseWindowsForms
(and its redundant local EnableWindowsTargeting) so the WPF/WinForms reference
packs are restored and the desktop TFMs reference-compile everywhere.
- Apple TFMs remain gated to Windows/macOS (they cannot build on Linux).
Verified on Linux: core + Splat.Drawing build across net8.0/net9.0/net10.0/
net462/net472/net481 and the -windows TFMs; full test suite passes (12825 passed, 0 failed).
Android TFMs were bare (`net9.0-android`/`net10.0-android`) with no platform
version. When Splat.Drawing is consumed via a cross-repo ProjectReference the
platform version is not resolved during restore, producing NU1012 ("Platform
version is not present for one or more target frameworks").
- Pin the versions: `net9.0-android35.0;net10.0-android36.0`.
- Update Splat.Drawing's Android `<ItemGroup>` condition from
`EndsWith('0-android')` (which no longer matches the versioned TFM) to the
version-agnostic `GetTargetPlatformIdentifier(...) == 'android'`, so the
Android `PlatformBitmapLoader` is still compiled in.
ChrisPulman
approved these changes
May 23, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1582 +/- ##
==========================================
- Coverage 79.47% 79.40% -0.07%
==========================================
Files 116 116
Lines 7168 7168
Branches 1143 1143
==========================================
- Hits 5697 5692 -5
- Misses 1162 1165 +3
- Partials 309 311 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
What
Two build/targeting fixes so the full Splat target matrix restores and reference-compiles on non-Windows machines.
1. Compile .NET Framework and Windows targets on non-Windows
EnableWindowsTargeting=trueso the WPF/WinForms/.NET Framework reference packs restore on any OS.IsOsPlatform('Windows')guards around the legacy (net462/net472/net481) and Windows desktop TFMs, and aroundUseWPF/UseWindowsFormsinSplat.Drawing, so those desktop TFMs reference-compile on Linux/macOS as well as Windows.2. Pin Android target platform versions
net9.0-android/net10.0-androidwere bare (no platform version). WhenSplat.Drawingis consumed via a cross-repoProjectReference, the platform version is not resolved during restore, producingNU1012("Platform version is not present for one or more target frameworks"). Pinned tonet9.0-android35.0;net10.0-android36.0.Splat.Drawing's Android<ItemGroup>condition fromEndsWith('0-android')(which no longer matches the versioned TFM) to the version-agnostic$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android', so the AndroidPlatformBitmapLoaderis still compiled in.Why
ReactiveUI temporarily project-references the local Splat / Splat.Drawing while the dead
System.Reactivedependency is removed. These changes let that full target matrix build on non-Windows CI and dev machines.