作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我收到此错误: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>
<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" />
最佳答案
我想,这个问题已经在这里得到了回答:
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/
我是一名优秀的程序员,十分优秀!