Could not load file or assembly despite adding binding redirect

1

I'm getting the following error when calling my 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)

Despite having this in the 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>

I'm not sure what I'm doing wrong here. I have the 4.2.0.0 version in my packages.config and shouldn't the above binding take care of the error I'm getting?

c#
asp.net
reference
.net-assembly
asked on Stack Overflow May 13, 2018 by SKLAK

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0