aspnetcore: Updating a `workload` during the "patch Tuesday" release window corrupts most dotnet commands on Linux and macOS

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When dotnet workload install wasm-tools (or any other workload) is run on a linux or macOS machine during the “patch Tuesday” release window it corrupts most of the dotnet commands.

This issue was first noted on a GitHub Actions build but subsequently experienced by multiple users on their local machines.

Command and output:

$ dotnet workload install wasm-tools

Skipping NuGet package signature verification.
Skipping NuGet package signature verification.
Installing workload manifest microsoft.net.sdk.android version 34.0.95...
Installing workload manifest microsoft.net.sdk.ios version 17.2.8043...
Installing workload manifest microsoft.net.sdk.maccatalyst version 17.2.8043...
Installing workload manifest microsoft.net.sdk.macos version 14.2.8043...
Installing workload manifest microsoft.net.sdk.maui version 8.0.7...
Installing workload manifest microsoft.net.sdk.tvos version 17.2.8043...
Installing workload manifest microsoft.net.workload.mono.toolchain.current version 8.0.4...
Installing workload manifest microsoft.net.sdk.aspire version 8.0.0-preview.5.24201.12...
Workload installation failed. Rolling back installed packs...
Installation rollback failed: Workload manifest dependency 'Microsoft.NET.Workload.Emscripten.Current' version '8.0.3' is lower than version '8.0.4' required by manifest 'microsoft.net.workload.mono.toolchain.current' [/usr/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.current/8.0.4/WorkloadManifest.json]
Workload installation failed: Workload manifest dependency 'Microsoft.NET.Workload.Emscripten.Current' version '8.0.3' is lower than version '8.0.4' required by manifest 'microsoft.net.workload.mono.toolchain.current' [/usr/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.current/8.0.4/WorkloadManifest.json]
Error: Process completed with exit code 1.

Expected Behavior

Expected to be able to update a workload at any time without it corrupting the local system.

Steps To Reproduce

Execute the following during a “patch Tuesday” release window when some but apparently not all dependencies have been released.

dotnet workload install wasm-tools

Exceptions (if any)

No response

.NET Version

8.0.202

Anything else?

Developers should not have to have knowledge of the .NET release process. The tooling should have checks built in to ensure that any dependencies it’s installing are actually available.

The tools should either:

  • Fail with a warning that not all dependencies of the next version are available, or
  • Install the existing working version - ie as 8.0.4 was only partially released the tool should have fallen back to 8.0.3

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

Thanks heaps @StudioLE, I ran into this issue with MAUI and following your suggested steps worked for me. I don’t think the SDK version matters as I already had 8.0.203 installed.

My specific error was: Unhandled exception: Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestCompositionException: Workload manifest dependency 'Microsoft.NET.Workload.Emscripten.Current' version '8.0.3' is lower than version '8.0.4' required by manifest 'microsoft.net.workload.mono.toolchain.current'

I’m not aware of a way to get dotnet workload install to use a specific version.

It seems something like that is being added for .NET SDK 8.0.300: https://github.com/dotnet/sdk/pull/37681 (--version from the command line), https://github.com/dotnet/sdk/pull/39644 (workloadVersion from global.json).

I believe I’ve managed to cleanup the mess dotnet workload install wasm-tools made of my system, but it was incredibly hacky.

Basically, I replaced /usr/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.current/8.0.4 with the 8.0.3 version.

cd /usr/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.current/
rm -rf 8.0.4
cp -r 8.0.3 8.0.4

I also updated the dotnet sdk to 8.0.203 but no idea if that was necessary.

This allowed me to finally run

dotnet workload uninstall wasm-tools
dotnet workload update

Which seems to have stabilised things as this now works:

dotnet new console
The template "Console App" was created successfully.