尽管添加了绑定重定向

时间:2018-05-13 01:56:30

标签: c# asp.net reference .net-assembly

调用Web API时出现以下错误:

Could not load file or assembly 'Microsoft.CommonSchema.Services, Version=4.1.0.0, Culture=neutral,
PublicKeyToken=872fbc9102191257' 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="Microsoft.CommonSchema.Services" publicKeyToken="872fbc9102191257" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
  </dependentAssembly>

我不确定我在这里做错了什么。我的packages.config中有4.2.0.0版本,上面的绑定不应该处理我得到的错误吗?

0 个答案:

没有答案