Saturday, April 9, 2011

Running CRM 4.0 App on CRM 2011 Server

I came accross an issue running software on a CRM 2011 server that was designed for CRM 4.0. There error that was reported is as follows:

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. (Exception from HRESULT: 0x80131040)


I was quite surprised to get this after being told by the CRM 2011 SDK that software targeting CRM 4.0 should still be compatible.

After lookin at this link it seems that the CRM 2011 installation is forwarding any reference to the CRM 4.0 assembly to the CRM 2011 assembly via a publisher policy - which aren't 100% compatible.

Although you can get around it by modifying your applications config file (which is described in the link above), this issue can also be fixed now by applying Rollup Pack 1 as indicated in the notes for the Rollup Pack:

The Microsoft.Crm.Sdk.dll file has an incorrect publisher policy registered in the global assembly cache (GAC). Therefore, when you use an application that is built with this dependency, the application fails in Microsoft Dynamics CRM 2011 Server.


Good to know if you intend to run software that was designed for CRM 4.0 on a CRM 2011 server.