dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.66k stars 1.06k forks source link

[NETSDKE2E] With 9.0.100-rc.2.24429.8 SDK exe installed, "Warning: Workload garbage collection failed with error: Failed to get global.json GC roots Value cannot be null. (Parameter 'key')" is shown after installing wasm-tools workload. #43114

Open darrenarvin123 opened 2 weeks ago

darrenarvin123 commented 2 weeks ago

Build: 9.0.100-rc.2.24429.8 SDK on win10-x64

1.Set up a clean machine with .NET SDK exe installed 2.In CLI, run dotnet workload install wasm-tools

Expected Result: wasm-tools installs successfully without any warnings or errors

Actual Result: Warning: Workload garbage collection failed with error: Failed to get global.json GC roots Value cannot be null. (Parameter 'key') is shown image

Note: Also seen when installing android workload image

dotnet --info .NET SDK: Version: 9.0.100-rc.2.24429.8 Commit: 6ccac5fda3 Workload version: 9.0.100-manifests.839ab7ed MSBuild version: 17.12.0-preview-24427-01+c256bcca0

Runtime Environment: OS Name: Windows OS Version: 10.0.19045 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\9.0.100-rc.2.24429.8\

.NET workloads installed: Configured to use loose manifests when installing new manifests. [android] Installation Source: SDK 9.0.100-rc.2 Manifest Version: 35.0.0-rc.2.89/9.0.100-rc.2 Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100-rc.2\microsoft.net.sdk.android\35.0.0-rc.2.89\WorkloadManifest.json Install Type: Msi

[wasm-tools] Installation Source: SDK 9.0.100-rc.2 Manifest Version: 9.0.0-rc.2.24429.5/9.0.100-rc.2 Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100-rc.2\microsoft.net.workload.mono.toolchain.current\9.0.0-rc.2.24429.5\WorkloadManifest.json Install Type: Msi

Host: Version: 9.0.0-rc.2.24427.10 Architecture: x64 Commit: static

.NET SDKs installed: 9.0.100-rc.2.24429.8 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 9.0.0-rc.2.24426.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 9.0.0-rc.2.24427.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 9.0.0-rc.2.24428.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found: None

Environment variables: Not set

global.json file: Not found

Learn more: https://aka.ms/dotnet/info

Download .NET: https://aka.ms/dotnet/download

marcpopMSFT commented 2 weeks ago

@dsplaisted workload garbage collection error. Please take a look.

v-ainigao commented 3 days ago

A similar error occurs when running dotnet workload clean --all with .net9.0.100-rc.2.24460.10sdk on ARM64OS. image Unhandled exception: Microsoft.DotNet.Workloads.Workload.WorkloadException: Failed to get global.json GC roots Value cannot be null. (Parameter 'key') at Microsoft.DotNet.Installer.Windows.InstallerBase.ExitOnFailure(InstallResponseMessage response, String message) at Microsoft.DotNet.Installer.Windows.MsiInstallerBase.GetGlobalJsonWorkloadSetVersions(SdkFeatureBand sdkFeatureBand) at Microsoft.DotNet.Workloads.Workload.Install.NetSdkMsiInstallerClient.GarbageCollect(Func2 getResolverForWorkloadSet, Nullable1 offlineCache, Boolean cleanAllPacks) at Microsoft.DotNet.Workloads.Workload.Clean.WorkloadCleanCommand.ExecuteGarbageCollection() at Microsoft.DotNet.Cli.WorkloadCleanCommandParser.<>c.b__3_0(ParseResult parseResult) at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult parseResult) at System.CommandLine.ParseResult.Invoke() at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)