Last week, while performing a Microsoft Dynamics CRM 2011 upgrade for a customer, we came across an error that caused all of our custom CRM 4.0 plugins to stop working. As always, before the live upgrade, we performed a test upgrade and everything had worked just fine. The only difference we could think of was that in the test upgrade, we had not applied any rollups to the CRM 2011 installation and in the live upgrade, we installed update rollup 6.
The error displayed was:
Unable to Process Request.
Message: Could not load file or assembly ‘Microsoft.Crm.Sdk, Version=4.0.0.0, Culture=neutral, PublicToken=31bf3856ad364e35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0×80131040)
After spending a couple of VERY frustrating hours trying to troubleshoot this on our own or find any KB articles or blog posts out there referencing this error, we were no further along. The plugins had been written for CRM 4.0 of course, but we had verified that everything worked correctly during out test upgrade.
To make a long story short, we started a support ticket with Microsoft and luckily were connected with the right person to help us out with this one. It turns out there is a known issue with installing Dynamics CRM 2011 and then going straight to Update Rollup 6 (I was told, but have not verified, that if you install Update Rollup 5 then 6, this will not happen.) At the time of writing this post, the KB article has evidently been written by the Microsoft CRM team, but has yet to be published. I will update this post with a link when it becomes available.
The issue, it turns out, is that there is a missing re-direct in Rollup 6 which prevents it from handling code written for CRM 4.0. Luckily, the fix for this is very simple.
- Open the CRM web.config file in notepad or similar text editor. Normally located here: (C:\Program Files\Microsoft Dynamics CRM\CRMWeb\web.config) on your CRM server.
- Insert the following lines of code at the very bottom, just before the closing “</configuration>” tag. Save the file and perform an IIS reset.
“<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-5.0.0.0″ newVersion=”5.0.0.0″ />
</dependentAssembly>
</assemblyBinding>
</runtime>”
Here is what it should look like when you are finished.

I was able to re-create and resolve this issue in another test environment by Installing Microsoft Dynamics CRM 2011, Installing Update Rollup 6, and following the steps I outlined above. The fix only takes a few seconds and is actually faster than installing Rollup 5 first IF you know how to deal with it!







