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.4was only partially released the tool should have fallen back to8.0.3
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (5 by maintainers)
I’d say this was a dupe of https://github.com/dotnet/sdk/issues/23820 or https://github.com/dotnet/sdk/issues/40070 then.
These dotnet/sdk issues discuss the problem:
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'It seems something like that is being added for .NET SDK 8.0.300: https://github.com/dotnet/sdk/pull/37681 (
--versionfrom the command line), https://github.com/dotnet/sdk/pull/39644 (workloadVersionfromglobal.json).I believe I’ve managed to cleanup the mess
dotnet workload install wasm-toolsmade 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.
I also updated the dotnet sdk to 8.0.203 but no idea if that was necessary.
This allowed me to finally run
Which seems to have stabilised things as this now works: