Skip to content

Fix MAUI workload installation for platform-specific CI builds#3

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/update-dotnet-workload-install
Draft

Fix MAUI workload installation for platform-specific CI builds#3
Copilot wants to merge 3 commits intomasterfrom
copilot/update-dotnet-workload-install

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 20, 2026

The generic maui workload fails on Ubuntu runners with "Workload ID maui isn't supported on this platform." Linux runners require platform-specific workloads.

Changes

  • Android (Ubuntu): Install maui-android workload + Java SDK 11 setup
  • Windows: Install maui-windows workload
  • macOS: Install maui-maccatalyst and maui-ios workloads

Each runner now installs only the workloads it can support, eliminating the cross-platform workload installation failure.

Original prompt

Problem

The GitHub Actions workflow is failing with the error:

Workload installation failed: Workload ID maui isn't supported on this platform.

This occurs in the build-android job running on ubuntu-latest when executing dotnet workload install maui.

Root Cause

The full maui workload is not supported on Linux runners. For Android builds on Ubuntu, we need to install the platform-specific maui-android workload instead.

Required Changes

Update the .github/workflows/build.yml file to fix the workload installation for all three build jobs:

1. build-android job (lines 16-53)

  • Change dotnet workload install maui to dotnet workload install maui-android
  • Add Java SDK setup (required for Android builds)
  • Consider using .NET 8.0.x instead of 10.0.x (as .NET 10 is not yet officially released)

2. build-windows job (lines 55-81)

  • Change dotnet workload install maui to dotnet workload install maui-windows
  • Consider using .NET 8.0.x instead of 10.0.x

3. build-macos job (lines 83-113)

  • Change dotnet workload install maui to dotnet workload install maui-maccatalyst maui-ios
  • Consider using .NET 8.0.x instead of 10.0.x

Additional Improvements

For the Android build job, add JDK setup before installing the MAUI workload:

- name: Setup JDK
  uses: actions/setup-java@v4
  with:
    distribution: 'microsoft'
    java-version: '11'

Expected Outcome

After these changes, the workflow should successfully install the platform-specific MAUI workloads and complete the builds for all three platforms (Android, Windows, and macOS).

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 20, 2026 04:01
Co-authored-by: Chenfyuan <13745755+Chenfyuan@users.noreply.github.com>
- Change from generic 'maui' workload to platform-specific workloads
- Android: Use 'maui-android' workload (fixes Linux compatibility)
- Windows: Use 'maui-windows' workload
- macOS: Use 'maui-maccatalyst maui-ios' workloads
- Add Java SDK 11 setup for Android builds (required for Android compilation)

Co-authored-by: Chenfyuan <13745755+Chenfyuan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix workload installation for Android and Windows build jobs Fix MAUI workload installation for platform-specific CI builds Jan 20, 2026
Copilot AI requested a review from Chenfyuan January 20, 2026 04:06
@Chenfyuan Chenfyuan self-requested a review January 20, 2026 05:11
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.

2 participants