Skip to content
Latchkey

MAUI "NETSDK1147: install the following workloads: maui" in CI

Building a .NET MAUI project needs the maui workload (or a platform workload like maui-android). A clean CI SDK does not ship it, so the build fails with NETSDK1147 and the exact dotnet workload install command.

What this error means

dotnet build of a MAUI project fails with "error NETSDK1147: To build this project, the following workloads must be installed: maui" plus the install command to run.

dotnet
error NETSDK1147: To build this project, the following workloads must be installed: maui
To install these workloads, run the following command: dotnet workload install maui

Common causes

The MAUI workload is not on the runner

Hosted images include the SDK but not the optional MAUI workload, which provides the Android, iOS, and platform build targets.

Workload band does not match the pinned SDK

A workload installed for a different SDK band is not picked up, so the build still reports the workload as missing.

How to fix it

Install the maui workload in CI

  1. Run dotnet workload install maui after setup-dotnet.
  2. For a single platform, install the narrower workload (for example maui-android).
  3. Build after the workload is present.
.github/workflows/ci.yml
- uses: actions/setup-dotnet@v4
  with:
    dotnet-version: '8.0.x'
- run: dotnet workload install maui
- run: dotnet build -c Release

Restore workloads from the project

Let the SDK install exactly the workloads the project requires.

Terminal
dotnet workload restore

How to prevent it

  • Install the MAUI workload as a CI step before build.
  • Match the workload to the pinned SDK band via global.json.
  • Install only the platform workloads you build to save time.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →