"Could not load file or assembly 'xxx' or one of its dependencies" Error

Follow

Description

After installing Active Commerce, you see a “Could not load file or assembly 'xxx' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.” error.

Cause

This usually means you've got code compiled against different versions of an assembly.

Solution

These can usually be resolved by adding a redirection to the newer version. This is added to the root node. Example section:

<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-3.2.0.0" newVersion="3.2.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Castle.Windsor" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-3.2.0.0" newVersion="3.2.0.0" />
    </dependentAssembly>
  </assemblyBinding>
</runtime>
Have more questions? Submit a request

Comments