gpt4 book ai didi

c# - Blazor [WASM] System.TypeLoadException : Could not resolve type with token 0100001a

转载 作者:行者123 更新时间:2023-12-03 23:47:14 27 4
gpt4 key购买 nike

我收到此错误:enter code here System.TypeLoadException: 无法从 typeref 解析带有标记 0100001a 的类型(程序集“System.Runtime,版本=4.2.2.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”中的预期类“System.Threading.Tasks.Task”)

当我切换到:

<TargetFramework>netcoreapp3.1</TargetFramework> 

或者
<TargetFramework>netcoreapp5.0</TargetFramework>

来自 netstandard2.1

我的包裹是:
<PackageReference Include="Blazored.LocalStorage" Version="2.1.5" />
<PackageReference Include="Blazorise" Version="0.9.0.2" />
<PackageReference Include="Blazorise.Bulma" Version="0.9.0.2" />
<PackageReference Include="Blazorise.Components" Version="0.9.0.2" />
<PackageReference Include="Blazorise.DataGrid" Version="0.9.0.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.0.2" />
<PackageReference Include="Blazorise.Sidebar" Version="0.9.0.2" />
<PackageReference Include="Blazorise.Snackbar" Version="0.9.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="3.2.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0-preview.4.20251.6" />
<PackageReference Include="System.Net.Http.Json" Version="5.0.0-preview.4.20251.6" />

<PackageReference Include="Toolbelt.Blazor.I18nText" Version="9.0.1.1" />
<PackageReference Include="Toolbelt.Blazor.SpeechRecognition" Version="0.0.4.6-alpha" />
<PackageReference Include="Toolbelt.Blazor.SpeechSynthesis" Version="8.0.0" />

有什么想法可以解决这个问题吗?

附:我很惊讶它在像这里这样的样本中正常工作: https://channel9.msdn.com/Events/Build/2020/BOD104

最佳答案

我想,这个问题已经在这里得到了回答:

Blazor WebAssembly 3.1 Target Framework is missing

This is OK. This is the latest version of Blazor WebAssembly App: .NETStandard 2.1

A Blazor WebAssembly App, unlike Balzor Server App , runs under the Mono runtime. It is not .Net Core.

关于c# - Blazor [WASM] System.TypeLoadException : Could not resolve type with token 0100001a,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61931707/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com