admin管理员组

文章数量:1122832

Installing .NET SDK v8.0.404 breaks the .NET installation and prevents building apps or opening projects in IDEs like Rider.

In the terminal, you may see an error like this:

/usr/share/dotnet/sdk/8.0.404/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.props(14,38): error MSB4242: SDK Resolver Failure: "The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed...

Installing .NET SDK v8.0.404 breaks the .NET installation and prevents building apps or opening projects in IDEs like Rider.

In the terminal, you may see an error like this:

/usr/share/dotnet/sdk/8.0.404/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.props(14,38): error MSB4242: SDK Resolver Failure: "The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed...
Share Improve this question asked Nov 22, 2024 at 15:49 MaximMaxim 13.4k6 gold badges34 silver badges47 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

This issue occurs because Microsoft missed something in their package for your OS (I tested on openSUSE).

To resolve it, follow these steps:

  • Go to the .NET installation directory and locate a path like the following:

    /usr/share/dotnet/sdk-manifests/8.0.100/workloadsets
    
  • There should be a directory corresponding to the latest .NET 8 version. For now it is 8.0.404-baseline.24523.81. Inside this directory, you can find the file baseline.workloadset.json.

  • Delete all directories that do not contain such file, in my case it is:

/usr/share/dotnet/sdk-manifests/8.0.100/workloadsets/8.0.401-baseline.24412.2
/usr/share/dotnet/sdk-manifests/8.0.100/workloadsets/8.0.402-baseline.24467.1

These directories were most likely not cleaned up after upgrading to dotnet-sdk-8.0.804.

本文标签: netBuild on Linux is failed after updating to dotnetsdk80 (80404)Stack Overflow