将项目依赖项中的MicrosoftAspNetCore.Components.WebAssembly.Server和MicrosoftAspNetCore.Components.WebAssembly.Authentication包更新为最新版本。此外,还需在项目的.csproj文件中添加以下元素才能解决此问题:
true
此元素将启用WebAssembly项目的链接。在进行此更改后,应用程序应重新生成并重新启动以使更改生效。
上一篇:Blazor项目找不到DynamicComponent。
下一篇:Blazor项目中的单元工作数据始终缓存,如何从数据库中获取数据?