What Broke in the Build
The project targets a workload-based platform, but the required .NET workload isn’t installed for the current SDK.
Fix the underlying build failure
Run dotnet workload restore, or dotnet workload install <id> if you need a specific workload, confirm installation with dotnet workload list, and retry with dotnet build.
Prove the Build Path Is Clean
dotnet workload list shows the required workload, and dotnet build succeeds without NETSDK1147.
Validation
Re-run the failing command and confirm the original code/message is gone, and confirm expected artifacts or outputs exist (packages restored, build/publish succeeds).
Why the Build Fails
Usually this comes down to the required workload isn’t installed on the machine or agent, the SDK version changed but workloads weren’t restored for that SDK, or workload installation is incomplete or corrupted.
Typical Output
error NETSDK1147: To build this project, the following workloads must be installed: maui-windows Mechanism
The SDK checks for workloads needed by the target platform, such as Android, iOS, or MAUI. If they’re missing, NETSDK1147 is emitted with a workload restore or install hint.
Keep Build Prerequisites Consistent
To prevent this, provision workloads explicitly in CI for workload-based repositories, and pin SDK versions and keep workloads aligned with global.json.
Docs and source code
NETSDK1147 message template
Workload missing message template and suggested command. - GitHub
<data name="WorkloadNotInstalled" xml:space="preserve">
<value>NETSDK1147: To build this project, the following workloads must be installed: {0}
To install these workloads, run the following command: dotnet workload restore</value>
<comment>{StrBegins="NETSDK1147: "}{Locked="dotnet workload restore"}</comment>
</data>