Skip to content

Fix snippet CI for MAUI Blazor Hybrid samples - #687

Open
mattleibow wants to merge 6 commits into
dotnet:mainfrom
mattleibow:mattleibow-sample-ci
Open

mattleibow wants to merge 6 commits into
dotnet:mainfrom
mattleibow:mattleibow-sample-ci

Conversation

@mattleibow

@mattleibow mattleibow commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Keep supported snippets.5000.json web entry points for all four existing MAUI Blazor Hybrid solutions, preserving shared Razor library and hosted WebAssembly compilation.
  • Build the native apps for Android, Windows, iOS Simulator, and Mac Catalyst across the .NET 8, 9, and 10 Hybrid samples: 16 project/platform combinations in six jobs.
  • Install isolated, matching .NET SDK/workload sets and select compatible, complete Xcode installations. Android prerequisites are installed through the SDK's InstallAndroidDependencies target. Apple builds don't need distribution certificates; no apps or simulators are launched.
  • Scope native restore using .github/maui-ci.targets without retargeting the referenced shared libraries. No sample C#, Razor, project, or solution files change.
  • Select affected samples using the PR's changed paths, including renamed paths. Workflow or CI-targets changes rebuild all four native samples; unrelated changes don't start native builds.

Why

The Snippets 5000 failure on #686 occurs during full-solution restore with NETSDK1147: the generic Windows runner doesn't have the MAUI workloads or Apple toolchain needed by the multi-platform solution. The web dependency graph and native apps now have separate, appropriate build environments rather than dropping native coverage.

Samples SDK/workload set macOS runner Xcode
.NET 8 Hybrid 8.0.427 macos-15 16.4
.NET 9 Hybrid and Identity 9.0.320 macos-26 26.5
.NET 10 Identity 10.0.400 macos-26 26.6

Android and Windows builds use windows-2022 with Java 17. The .NET 8 Apple job uses the complete preinstalled Xcode 16.4 SDK/runtime stack rather than the older Xcode symlink or a legacy runtime download.

Validation

  • Full native + web GitHub Actions run passed at 3eafb6b2d44b3a6a0daed4d1d5cc8dbb924187d4. All six MAUI jobs and the Snippets 5000 web job succeeded. Build logs confirm all 16 native project/platform outputs, including both .NET 9 native apps.
  • Workflow linting passes. Exact workflow-script checks cover changed-sample selection, renamed paths, Android prerequisites, all 16 native commands, unsigned Apple runtime IDs, and failure propagation.
  • Actual .NET 8/9/10 project evaluation verifies native platform selection. A real .NET 10 restore confirms that only the requested native target is restored while the shared library remains net10.0.
  • All four local web/shared graphs and an isolated Add WebAssembly to the .NET 10 Blazor Hybrid Identity sample #686 fixture including its hosted WASM client also built successfully.

This PR is based directly on main and remains separate from #686. Identity and Entra feature sessions are untouched. No merge or auto-merge is enabled.

mattleibow and others added 6 commits October 31, 2026 03:50
Use Snippets 5000 custom build commands to compile each Hybrid sample's web project and referenced shared or hosted WebAssembly projects without restoring native MAUI targets. Document the separate native-platform validation requirement.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add affected-sample native build jobs for Android, Windows, iOS Simulator, and Mac Catalyst alongside the existing web/shared/WASM checks. Pin matching SDK/workload and Xcode combinations, isolate SDK installs, and scope native restore without retargeting referenced shared libraries.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Avoid the hosted runner's Xcode_16.0.app symlink, which triggers the older Apple workload's ACTool SDK lookup failure. Use the actual Xcode_16.app installation documented by the runner image.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Provision iOS 18.0 for the .NET 8/Xcode 16 job. The current hosted image no longer includes that simulator runtime, which ACTool requires to compile assets even without launching a simulator.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the hosted runner's Xcode 26.3 CLI only for downloading iOS 18.0, since Xcode 16.0 lacks the buildVersion option. Keep native .NET 8 compilation on its matching canonical Xcode 16 installation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Select the preinstalled Xcode 16.4 SDK and matching simulator runtime instead of depending on a legacy iOS 18.0 runtime download. Keep native platform compilation and remove the failed cross-version runtime provisioning path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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