CI: build the sample on the net8 and net10 extremes as a matrix - #15
Merged
Conversation
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>
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.
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 buildstill 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.