Blazor WebAssembly version 5 build error after migration

|▌冷眼眸甩不掉的悲伤 提交于 2020-12-12 10:49:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!