【发布时间】:2022-01-04 21:46:02
【问题描述】:
谁能解释为什么我们会收到诸如无法加载文件或程序集之类的错误。每当我特别在 azure sdk 中更新 nuget 引用时,我都会遇到这个错误,并且由于缺乏知识,我很难非常奇怪地修复它们。你能解释一下这个错误吗?我的意思是我可以消化这个错误,但我找不到真正的解决方案。
我已经明确决定我会理解这个错误并在这个平台上获得更多信息。如果你能一步一步地解释这一点,那将增加我对核心生产力的认识。
我对这种类型的错误了解非常有限,我们需要在 web.config 文件中添加一些代码。
<bindingRedirect oldVersion="0.0.0.0-0.0.0.1" newVersion="0.0.0.1" />
但老实说,我不知道如何决定哪个版本需要替换为新旧版本。我最近在我的项目中添加了 Azure.Identity nuget。
<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.5.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.10.0" />
</ItemGroup>
例如,现在我一直在努力解决这个错误。
System.IO.FileLoadException
HResult=0x80131040
Message=Could not load file or assembly 'Azure.Core, Version=1.19.0.0, Culture=neutral,
PublicKeyToken=92742159e12e44c8' or one of its dependencies. The located assembly's
manifest definition does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Source=Azure.Storage.Blobs
StackTrace:
我知道在哪里更改以解决此错误,但不知道要更改什么。
【问题讨论】:
-
请在本站搜索
[c#] could not load file or assembly or one of its dependencies,搜索结果超过4000条。 -
感谢 Stuartd 发布此 URL nickcraver.com/blog/2020/02/11/binding-redirects
标签: c# azure-sdk-.net azure-identity