Spring.net dependencies to consider in bindingRedirect

369 Views Asked by At

I'm using spring.net version 2.0.0 in a Web API project and I just added a reference to a dll that depends on spring.net version 1.3.2.

I'm doing the following in my web.config:

<assemblyBinding>
      <dependentAssembly>
        <assemblyIdentity name="Common.Logging" publicKeyToken="af08829b84f0328e" culture="neutral" />
        <bindingRedirect oldVersion="1.2.0" newVersion="2.1.1" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Spring.Core" publicKeyToken="65e474d141e25e07" culture="neutral"/>
        <bindingRedirect oldVersion="1.3.2" newVersion="2.0.0" />
      </dependentAssembly>
</assemblyBinding>

But I keep getting the following error message:

Could not load file or assembly 'Spring.Core, Version=1.3.2.40943, Culture=neutral, PublicKeyToken=65e474d141e25e07' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

Is there another dependency I'm missing, or maybe I'm misunderstanding bindingRedirect configuration.

EDIT: I found that Spring.Net 2.0 dll's publickeytoken is null while 1.3.2 dll's publickeytoken is 65e474d141e25e07. I think this is the problem, is there a way to use bindingRedirect in this scenario?

0

There are 0 best solutions below