Skip to content

.NET projects can't be used #24

@mattchenderson

Description

@mattchenderson

Hi all,

I attempted to use this template and ran into a few issues. I captured the Functions-specific issue in #21, but this issue is meant to reflect challenges with using .NET.

The above template unfortunately includes a global.json which is not helping it, but the same experience can be seen from others or when starting from scratch.

There's an immediate set of errors from the .NET extensions: a NuGet restore fails, and the C# extension will also immediately complain about locating the SDK. The following are coming from another one of the awesome-azd .NET templates.

.NET SDK was resolved to /usr/share/dotnet/dotnet, but it failed to run. It is possible the installation of the .NET is corrupted, or not properly signed, or has no permission to run.

An issue was encountered verifying workloads. For more information, run "dotnet workload update".
/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 while attempting to resolve the SDK "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator". Exception: "System.InvalidOperationException: No workload set information found in: /usr/share/dotnet/sdk-manifests/8.0.100/workloadsets/8.0.402-baseline.24467.1 [/home/matthew/azuredev-722f/src/api/Todo.Api.csproj]

The .NET Core SDK cannot be located: Error running dotnet --info: Error: Command failed: dotnet --info System.InvalidOperationException: No workload set information found in: /usr/share/dotnet/sdk-manifests/8.0.100/workloadsets/8.0.402-baseline.24467.1 at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadSet.FromWorkloadSetFolder(String path, String workloadSetVersion, SdkFeatureBand defaultFeatureBand) at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.g__AddWorkloadSetsForFeatureBand|27_0(Dictionary2 availableWorkloadSets, String featureBandDirectory) at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.GetAvailableWorkloadSetsInternal(Nullable1 workloadSetFeatureBand) at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.RefreshWorkloadManifests() at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider..ctor(String sdkRootPat...

If you ls /usr/share/dotnet/sdk-manifests/8.0.100/workloadsets/*, you'll see that there's an empty folder that seems to be getting hit, rather than the one we'd expect to use:

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

/usr/share/dotnet/sdk-manifests/8.0.100/workloadsets/8.0.404-baseline.24523.8:
baseline.workloadset.json

That seems like a probable culprit to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions