dotnet workload restore issue

Min T 81 Reputation points
2025-04-15T20:30:59.2233333+00:00

came back to an old brooding .net maui project from last year. at the time, it was compiling and running fine.

after starting it up again, ive run into compile issues.

Error (active) NETSDK1147 To build this project, the following workloads must be installed: wasi-experimental To install these workloads, run the following command: dotnet workload restore XXXX (net8.0-ios), XXXX (net8.0-maccatalyst) C:\Program Files\dotnet\sdk\8.0.408\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets 38 Error (active) MSB4236 The SDK 'Microsoft.NET.Runtime.MonoAOTCompiler.Task' specified could not be found. XXXX (net8.0-android34.0) C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.113\targets\Microsoft.Android.Sdk.Aot.targets 25 Error (active) NETSDK1005 Assets file 'D:\VS\2022\XXXX\0.4_mopups\XXXXZebra\r4\XXXX\obj\project.assets.json' doesn't have a target for 'net8.0-windows10.0.19041.0'. Ensure that restore has run and that you have included 'net8.0-windows10.0.19041.0' in the TargetFrameworks for your project. XXXX (net8.0-windows10.0.19041.0) C:\Program Files\dotnet\sdk\8.0.408\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets 266

looking in the nuget package manager, i saw that the few packages i installed dont show up as installed. and when i try to reinstall them it doesnt let me.

i couldnt find a specific resource online to solve my issue, but have tried following the steps it suggests. the suggestion from some posts was to do dotnet workload restore. when i tried running it, it gave some more errors that are hard to troubleshoot with online resources

Project "D:\VS\2022\XXXX\0.4_mopups\XXXXZebra\r4\XXXX\XXXX.csproj" (_GetRequiredWorkloads target(s)): C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.113\targets\Microsoft.Android.Sdk.Aot.targets(25,5): error : Could not resolve SDK "Microsoft.NET.Runtime.MonoAOTCompiler.Task". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK. C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.113\targets\Microsoft.Android.Sdk.Aot.targets(25,5): error : SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null. C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.113\targets\Microsoft.Android.Sdk.Aot.targets(25,5): error : The NuGetSdkResolver did not resolve this SDK because there was no version specified in the project or global.json.


Project "D:\VS\2022\XXXX\0.4_mopups\XXXXZebra\r4\XXXX\XXXX.csproj" is building Project "D:\VS\2022\XXXX\0.4_mopups\XXXXZebra\r4\XXXX\XXXX.csproj" (_GetRequiredWorkloads target(s)): C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.113\targets\Microsoft.Android.Sdk.Aot.targets(25,33): error MSB4236: The SDK 'Microsoft.NET.Runtime.MonoAOTCompiler.Task' specified could not be found. Done building project "XXXX.csproj" -- FAILED. Done building project "XXXX.csproj" -- FAILED. dotnet : Failed to restore workload for project Project D:\VS\2022\XXXX\0.4_mopups\XXXXZebra\r4\XXXX\XXXX.csproj: Failed to run MSBuild Target _GetRequiredWorkloads. At line:1 char:1

  • dotnet workload restore
  •     + CategoryInfo          : NotSpecified: (Failed to resto...uiredWorkloads.:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError
    

was looking for any help with troubleshooting whats going on:

  • why all of a sudden my installed nuget packages dont appear on the installed list and cant be reinstalled (even though in the proj file i see the packages)
  • how to clear up the dotnet restore issues and compile issues
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,068 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 74,451 Reputation points
    2025-04-15T21:05:24.3466667+00:00

    a year is long time to go without updating a maui (or any mobile project) build chain. also Maui 8 supports ends on May 15.

    at this point you are probably better off creating a new Maui 9 project, and porting the code to the new project.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.