Background
I am troubleshooting an issue where adding an internal nuget package (as in on a private feed) to a Blazor WASM causes a yellow warning triangle on the package reference.
The build fails with error:
Error NETSDK1082 There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.I don't think that's the actual error, so I was looking into the build output with verbosity set to detailed instead of minimal. It's a very long log, but there I see this occuring:
Restoring packages for net8.0/browser-wasm...Resolving conflicts for net8.0/browser-wasm... CACHE https://api.nuget.org/v3/vulnerabilities/index.json CACHE https://api.nuget.org/v3-vulnerabilities/2024.04.18.07.01.18/vulnerability.base.json CACHE https://api.nuget.org/v3-vulnerabilities/2024.04.18.07.01.18/2024.04.22.07.01.30/vulnerability.update.jsonAll packages and projects are compatible with net8.0.All packages and projects are compatible with net8.0 (browser-wasm).And ultimately a failure:
1> Task "ResolveRuntimePackAssets"1> C:\Program Files\dotnet\sdk\8.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(491,5): error NETSDK1082: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.1> Done executing task "ResolveRuntimePackAssets" -- FAILED.1>Done building target "ResolveRuntimePackAssets" in project "My.Client.csproj" -- FAILED.1>1>Done building project "My.Client.csproj" -- FAILED.What I am trying to do
I suspect that, for whatever reason, my library isn't compatible with the Blazor WASM project. To troubleshoot this I am trying to add that reference directly as a project reference (= dll), as both are on my local machine to see if there's any errors.
That gives me this modal:
Adding this library to any other project type (not Blazor) works fine, either as a dll or nuget package.
My question
What's going on and how can I determine the cause of this 'unsupported' issue?
PS: There's a question with the same subject, but no answer.
