![](/img/trans.png)
[英]ASP.NET Core Error: System.TypeLoadException: Could not load type 'Microsoft.AspNetCore.WebUtilities.FileBufferingWriteStream'
[英]ASP.NET Error: System.TypeLoadException Could not load type of field 'Microsoft.Owin.Security.ActiveDirectory
我从git存储库克隆了一个应用程序,该应用程序的构建没有错误和警告,但是运行该应用程序时,出现以下错误:错误500:System.TypeLoadException无法加载字段类型“ Microsoft.Owin.Security.ActiveDirectory”。 WsFedMetadataRetriever:CS $ <> 9__CachedAnonymousMethodDelegate5'(1)由于:无法解析令牌为01000045的类型(来自typeref,类/程序集System.IdentityModel.Metadata.KeyDescriptor,System.IdentityModel,Version = 4.0.0.0,Culture = neutral, PublicKeyToken = b77a5c561934e089)程序集:System.IdentityModel,版本= 4.0.0.0,文化=中性,PublicKeyToken = b77a5c561934e089类型:System.IdentityModel.Metadata.KeyDescriptor成员:(空)签名:
我试图通过将以下内容添加到web.config文件中来解决此问题:
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
</dependentAssembly>
<dependentAssembly>
...但是我仍然得到错误; 我正在使用Visual Studio Community 2017 for Mac。 我可以帮忙吗?
我更新了所有的Nuget软件包,并安装了Microsoft.ApplicationInsights.AspNetCore。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.