Thursday 21 February 2013

Could not load file or assembly 'Microsoft.Crm.Sdk, Version=4.0.0.0, Culture=neutral

If ISV code is giving following error

Could not load file or assembly 'Microsoft.Crm.Sdk, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference
This is most likely due to latest version of CRM is installed which has 5.0.0.0 assembly, and ISV code was developed using Version=4.0.0.0 crm.sdk assembly.


To solve this issue open isv code's web.config file and add following config after <configSections> node and do an iis reset code.

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Crm.Sdk" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="4.0.0.0" newVersion="5.0.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

No comments:

Post a Comment