【发布时间】:2017-11-05 08:23:42
【问题描述】:
我在我的项目中引用了一个名为Something.dll的dll
当我尝试从该 dll 调用方法时,我得到错误
Could not load file or assembly 'Something, Version=1.2.1.1, Culture=neutral, PublicKeyToken=57732cb8f5e77948' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
我的 web.config 看起来像
<dependentAssembly>
<assemblyIdentity name="Something" publicKeyToken="57732cb8f5e77948" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.0.1" newVersion="1.2.0.1" />
</dependentAssembly>
我如何阅读这个问题。我没有任何具有版本 1.2.1.1 的名称的 dll。我正在使用 Visual Studio 2013。
【问题讨论】:
-
你是如何引用
Something.dll的?你是安装了 Nuget 包,还是手动添加了引用? -
@Dido 我尝试了两种方式
-
尝试将
publicKeyToken设置为null。 -
@Dido 即使我添加了 null 它仍然返回我相同的 publickeytoken
-
可能是dll的目标平台和你的程序不兼容,similar question
标签: c# visual-studio visual-studio-2013