问题
After migrating to .Net Core 5
my standalone BlazorWebAssembly
project could not be build and have the following error, I tried so many thing but it did not fixed.
NETSDK1082 There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'. MyProjectName C:\Program Files\dotnet\sdk\5.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets 387
(I have tested with both Visual Studio 2019 16.8.1
and also 16.9.0 preview 1
)
Update: I found the origin of the problem. If I remove the following package everything works fine. I fact I tested with a default Blazor
example template in Visual Studio and added the following package and get again the error. But why?
/* version 3.1.9 and 3.1.10 have the same problem too*/
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0" />
来源:https://stackoverflow.com/questions/64818508/blazor-webassembly-version-5-build-error-after-migration