Skip to content

CI: build the sample on the net8 and net10 extremes as a matrix - #15

Merged
sbokatuk merged 2 commits into
mainfrom
ci-emulator-disk-space
Jul 26, 2026
Merged

CI: build the sample on the net8 and net10 extremes as a matrix#15
sbokatuk merged 2 commits into
mainfrom
ci-emulator-disk-space

Conversation

@sbokatuk

Copy link
Copy Markdown
Owner

The sample was built once, without -f, so it only ever exercised the single band its TargetFramework named (net9) - the net8 and net10 asset sets the package actually ships went unbuilt, and a façade that fails to link on the oldest or newest toolchain would not be caught until a consumer hit it.

The sample now selects one target framework per SDK band via SampleSdkBand (net9 by default, so local dotnet build still just works), and a build-samples matrix builds the net8 and net10 extremes, each on its own SDK band through a scratch global.json - the same mechanism run-device-tests.sh uses - with fail-fast off so a red net10 beside a green net8 localises the cause. Release, so R8 linking is exercised, not just restore.

CommunityToolkit.Maui and its MediaElement (the before/after video preview) have no single version spanning net8 and net10 - each band was dropped as the next arrived - so their versions, and Microsoft.Extensions.Logging.Debug, are now selected per target framework (net8 -> 9.1.1/4.1.2, net9 -> 11.0.0/6.0.1, net10 -> 15.0.0/10.0.0). Verified: the net9 band builds clean with zero warnings; the net8/net10 toolkit versions are confirmed on nuget.org with the exact platform assets, and their Release builds run in the new matrix.

sbokatuk and others added 2 commits July 26, 2026 01:02
The sample was built once, without -f, so it only ever exercised the single
band its TargetFramework named (net9) - the net8 and net10 asset sets the
package actually ships went unbuilt, and a façade that fails to link on the
oldest or newest toolchain would not be caught until a consumer hit it.

The sample now selects one target framework per SDK band via SampleSdkBand
(net9 by default, so local `dotnet build` still just works), and a
build-samples matrix builds the net8 and net10 extremes, each on its own SDK
band through a scratch global.json - the same mechanism run-device-tests.sh
uses - with fail-fast off so a red net10 beside a green net8 localises the
cause. Release, so R8 linking is exercised, not just restore.

CommunityToolkit.Maui and its MediaElement (the before/after video preview)
have no single version spanning net8 and net10 - each band was dropped as the
next arrived - so their versions, and Microsoft.Extensions.Logging.Debug, are
now selected per target framework (net8 -> 9.1.1/4.1.2, net9 -> 11.0.0/6.0.1,
net10 -> 15.0.0/10.0.0). Verified: the net9 band builds clean with zero
warnings; the net8/net10 toolkit versions are confirmed on nuget.org with the
exact platform assets, and their Release builds run in the new matrix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Not yet observed here - the iOS repo's matrix hit both of these first and this sample
carries the same two constructs.

Microsoft.Maui.Controls came from $(MauiVersion), which is whatever the installed
workload bundles - 10.0.20 on the net10 runner image - while CommunityToolkit.Maui
15.0.0 and CommunityToolkit.Maui.MediaElement 10.0.0 both declare a 10.0.60 floor,
so restore fails NU1605. Controls is an ordinary NuGet package independent of the
workload pack, so pin the toolkit's floor on the net10 band; net8 and net9 keep the
workload's own version.

MediaElement 10.0.0 also made isAndroidForegroundServiceEnabled a required argument
of UseMauiCommunityToolkitMediaElement (CS7036). Pass false - this sample previews a
local file in the foreground, and opting in would also require
FOREGROUND_SERVICE_MEDIA_PLAYBACK in the manifest.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sbokatuk
sbokatuk merged commit c41f566 into main Jul 26, 2026
7 checks passed
@sbokatuk
sbokatuk deleted the ci-emulator-disk-space branch July 26, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant