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.71k stars 1.07k forks source link

With .NET 8 SDK installed, Warning "Workload garbage collection failed with error: Workload version 8.0.400-baseline.24372.6 was not found.." displayed when installing Maui workload in CLI. #42357

Closed v-Lily closed 2 months ago

v-Lily commented 3 months ago

Repro steps:

1.Installed .NET8.0.400 SDK from Pipelines - Run 20240723.2-8.0.400-rtm.24372.6,8.0.304-servicing.24372.2,8.0.108-servicing.24372.8-232548,232498,232515 artifacts. 2.In Mac OS CLI, execute: sudo dotnet workload install maui ios maccatalyst android macos tvos

Expected Result:

workload should be installed successfully, and no warnings should be displayed in the output.

Actual Result

Warning "Workload garbage collection failed with error: Workload version 8.0.400-baseline.24372.6 was not found.." displayed. image

Further technical details

vstester@vstesters-Mac-mini-2 ~ % dotnet --info
.NET SDK:
Version:           8.0.400
Commit:            6f7e622bb6
Workload version:  8.0.400-manifests.39d75d02
MSBuild version:   17.11.3+0c8610977

Runtime Environment:
OS Name:     Mac OS X
OS Version:  14.5
OS Platform: Darwin
RID:         osx-x64
Base Path:   /usr/local/share/dotnet/sdk/8.0.400/

.NET workloads installed:
Configured to use loose manifests when installing new manifests.
[macos]
   Installation Source: SDK 8.0.400
   Manifest Version:    14.5.8013/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.macos/14.5.8013/WorkloadManifest.json
   Install Type:        FileBased

[ios]
   Installation Source: SDK 8.0.400
   Manifest Version:    17.5.8013/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.ios/17.5.8013/WorkloadManifest.json
   Install Type:        FileBased

[maccatalyst]
   Installation Source: SDK 8.0.400
   Manifest Version:    17.5.8013/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maccatalyst/17.5.8013/WorkloadManifest.json
   Install Type:        FileBased

[maui]
   Installation Source: SDK 8.0.400
   Manifest Version:    8.0.70/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.70/WorkloadManifest.json
   Install Type:        FileBased

[tvos]
   Installation Source: SDK 8.0.400
   Manifest Version:    17.5.8013/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.tvos/17.5.8013/WorkloadManifest.json
   Install Type:        FileBased

[android]
   Installation Source: SDK 8.0.400
   Manifest Version:    34.0.127/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.android/34.0.127/WorkloadManifest.json
   Install Type:        FileBased

Host:
  Version:      8.0.8
  Architecture: x64
  Commit:       08338fcaa5

.NET SDKs installed:
  8.0.400 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
balachir commented 3 months ago

@marcpopMSFT this is one more issue that's being tracked by our validation team as a blocking one for SDK 8.0.400 (Aug update) signoff? Can you investigate and re-route appropriately, please? Thanks!

marcpopMSFT commented 3 months ago

I don't think this is a blocker for the August release as it's a warning. Forgind was investigating

Forgind commented 3 months ago

After investigating, I'm pretty sure that this was a bug we'd actually already fixed but only in main, unfortunately. Here are the two commits I would recommend we take for 8.0.400: 3345506902aedf41604792ea6214521c17cdea38 f6f8c9dbaead2d96decc5e1d4e9f6a006728f3c7

marcpopMSFT commented 3 months ago

Forgind found the fix. install just has a warning but uninstall is blocked. Worth fixing for 401 but not worth respinning 400.

v-Lily commented 2 months ago

@v-wuzhai @Forgind I verified this issue also repro on [8.0.401 SDK] (https://dev.azure.com/dnceng/internal/_build/results?buildId=2513974&view=artifacts&pathAsName=false&type=publishedArtifacts), According to @v-wuzhai's comment, I found this issue is fixed on dotnet/sdk.

v-Lily commented 2 months ago

@v-wuzhai @Forgind Verified this issue on the latest 8.0.402 SDK, it doesn't reproduce.

esrahat commented 2 months ago

I fixed the problem by downloading .net 9 preview version of the .net sdk , uninstalled the 8.0.402 version and installed the new one.