.NET 6预览版4:没有适用于指定运行时标识符的Microsoft.AspNetCore.App的运行时包。 [英] .NET 6 preview 4: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'

查看:24
本文介绍了.NET 6预览版4:没有适用于指定运行时标识符的Microsoft.AspNetCore.App的运行时包。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用.NET6.0.100-preview.4.21255.9,ASP.NET Core Blazor WebAssembly6.0.100-preview.4.21255.9。我尝试通过以下方式覆盖默认标识用户界面:添加对NuGet包的引用]Microsoft.AspNetCore.Identity.UI(https://www.nuget.org/packages/Microsoft.AspNetCore.Identity.UI/6.0.0-preview.4.21253.5?_src=template),但添加此NuGet包时出错(另一个NuGet包正常)

Severity    Code    Description Project File    Line    Suppression State
Error   NETSDK1082  There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.    acc.Client  C:Program Filesdotnetsdk6.0.100-preview.4.21255.9SdksMicrosoft.NET.Sdk	argetsMicrosoft.NET.Sdk.FrameworkReferenceResolution.targets 391 
Error   NETSDK1082  There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.    acc.Client  C:Program Filesdotnetsdk6.0.100-preview.4.21255.9SdksMicrosoft.NET.Sdk	argetsMicrosoft.NET.Sdk.FrameworkReferenceResolution.targets 391 

主要错误信息:

There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'

当我单击查看详细信息错误时,它指向

<ResolveRuntimePackAssets FrameworkReferences="@(FrameworkReference)"
                          ResolvedRuntimePacks="@(ResolvedRuntimePack)"
                          UnavailableRuntimePacks="@(UnavailableRuntimePack)"
                          SatelliteResourceLanguages="$(SatelliteResourceLanguages)"
                          DesignTimeBuild="$(DesignTimeBuild)">
  <Output TaskParameter="RuntimePackAssets" ItemName="RuntimePackAsset" />
</ResolveRuntimePackAssets>
(文件C:Program Filesdotnetsdk6.0.100-preview.4.21255.9SdksMicrosoft.NET.Sdk argetsMicrosoft.NET.Sdk.DefaultItems.targets。摘自https://gist.github.com/donhuvy/d98d59e8af9947e37e6d4fe85004e444#file-microsoft-net-sdk-frameworkreferenceresolution-targets-L391-L397)

如何添加NuGet包用户界面成功?

推荐答案

  • 升级到新的/最新版本的.NET
  • 清除Web浏览器中的缓存
  • 删除旧的生成程序(objbin),清理/重新生成解决方案。

这篇关于.NET 6预览版4:没有适用于指定运行时标识符的Microsoft.AspNetCore.App的运行时包。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆