Intermittent error - microsoft.net.workload.mono.toolchain error when running 'dotnet workload install maui' command in DevOps

coenraad 1 Reputation point
2022-10-16T13:04:40.83+00:00

Getting intermittent errors when running the dotnet workload install maui command via DevOps.
Was stable until .Net SDK and/or microsoft.net.workload.mono.toolchain was updated on the DevOps agents.

See log excerpts below, issue seems to be that the correct version of the dependent 'microsoft.net.workload.emscripten' manifest is not installed consistently.
Any thoughts would be appreciated.

Sample Error: Workload installation failed: Workload manifest dependency 'Microsoft.NET.Workload.Emscripten' version '6.0.4' is lower than version '6.0.10' required by manifest 'microsoft.net.workload.mono.toolchain' [C:\hostedtoolcache\windows\dotnet\sdk-manifests\6.0.400\microsoft.net.workload.mono.toolchain\WorkloadManifest.json]

I noticed our issues started around the time when the .Net SDK version was updated from 6.0.302.
Tried locking down this version but the 'dotnet workload install maui' command still downloads the latest 'mono.toolchain' version.

Here is an abbreviated history of pipeline runs:

2022-08-04 - PASS
SDK Version: 6.0.302
Installing workload manifest microsoft.net.workload.mono.toolchain version 6.0.7
No mention of microsoft.net.workload.emscripten

2022-08-05 - PASS
SDK Version: 6.0.302
Installing workload manifest microsoft.net.workload.mono.toolchain version 6.0.7
No mention of microsoft.net.workload.emscripten

2022-08-12 - PASS
SDK Version: 6.0.400
Installing workload manifest microsoft.net.workload.mono.toolchain version 6.0.8
No mention of microsoft.net.workload.emscripten

2022-09-28 - PASS/FAIL
SDK Version: 6.0.401
Installing workload manifest microsoft.net.workload.mono.toolchain version 6.0.9
Installing workload manifest microsoft.net.workload.emscripten version 6.0.9
Build passed for this particular issue, but IOS build failed with different error (which later corrected itself). Including as may be a clue.
Command: dotnet publish -f net6.0 -c Release
Error: ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

2022-10-03 - PASS
SDK Version: 6.0.401
Installing workload manifest microsoft.net.workload.mono.toolchain version 6.0.9
Installing workload manifest microsoft.net.workload.emscripten version 6.0.9

2022-10-11 - PASS
SDK 6.0.401
Installing workload manifest microsoft.net.workload.mono.toolchain version 6.0.9
Installing workload manifest microsoft.net.workload.emscripten version 6.0.9

2022-10-11 - FAIL
SDK Version: 6.0.401
Installing workload manifest microsoft.net.workload.mono.toolchain version 6.0.10
Installing workload manifest microsoft.net.workload.emscripten version 6.0.9
Error: Workload installation failed: Workload manifest dependency 'Microsoft.NET.Workload.Emscripten' version '6.0.9' is lower than version '6.0.10' required by manifest 'microsoft.net.workload.mono.toolchain' [C:\hostedtoolcache\windows\dotnet\sdk-manifests\6.0.400\microsoft.net.workload.mono.toolchain\WorkloadManifest.json]

2022-10-11 - PASS
SDK Version: 6.0.401
Installing workload manifest microsoft.net.workload.mono.toolchain version 6.0.10
Installing workload manifest microsoft.net.workload.emscripten version 6.0.10

2022-10-14 - PASS
SDK Version: 6.0.402
Installing workload manifest microsoft.net.workload.mono.toolchain version 6.0.10
Installing workload manifest microsoft.net.workload.emscripten version 6.0.10

2022-10-14 - FAIL
SDK Version: 6.0.402
Installing workload manifest microsoft.net.workload.mono.toolchain version 6.0.10
No mention of microsoft.net.workload.emscripten
Error: Workload installation failed: Workload manifest dependency 'Microsoft.NET.Workload.Emscripten' version '6.0.4' is lower than version '6.0.10' required by manifest 'microsoft.net.workload.mono.toolchain'

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,901 questions
{count} votes

1 answer

Sort by: Most helpful
  1. 57584982 0 Reputation points
    2023-01-30T00:37:54.7766667+00:00

    In my case, the problem was due to an incomplete or corrupted installation of MS Visual Studio. The missing file is part of that system. And it can't be repaired or uninstalled without this file, menifest, or .msi file.

    But, I was able to fix all of that by doing a fresh new install of the current version of Visual Studio right on top of the older damaged vesion. And the problem seemed to be fixed.

    The installer for the current version is apparently smart enough to completely uninstall the previous version, do needed cleanup, and successfully install the new version. Uninstalling this version seemed to work perfectly, and the related missing .net manifest error message then no longer appeared.

    0 comments No comments