Friday, September 9, 2016

Could not load file or assembly 'Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies



Exception Messages

File Load Exceptions: "Could not load file or assembly 'Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
(Exception from HRESULT: 0x80131040)":"Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"


How and When Problem Occurs

It so happen that I referred latest version of Microsoft Dynamic CRM Dll ('Microsoft.Xrm.Sdk) in my project. The version for this DLL is 8.0.0.0.

I forgot to update other Microsoft Dynamic CRM Dll’s (Microsoft.Crm.Sdk.Proxy) in the same project. The version for this DLL is 6.0.0.0.

These DLL’s are dependent on each other and cannot refer to other version of DLL’s at the same time in same project. So there was a mismatch of the version and that’s why CRM platform given File Load Exceptions.


Solution :

When connecting to MS CRM 2016, we need to refer MS CRM 2016 SDK DLL’s with all same version to avoid File Load Exception.

You can download MS CRM 2016 SDK latest DLL from here.

Microsoft.Xrm.Sdk                          version – 8.0.0.0
Microsoft.Crm.Sdk.Proxy                version – 8.0.0.0



No comments: