Home > Dynamics CRM > Microsoft Dynamics CRM 2011–Could not load file or assembly ‘Microsoft.IdentityModel’

Microsoft Dynamics CRM 2011–Could not load file or assembly ‘Microsoft.IdentityModel’

Have you encountered the error below with Microsoft Dynamics CRM 2011?

Could not load file or assembly ‘Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified

The error above relates to a missing DLL called Microsoft.IdentityModel version 3.5.0.0. This file normal exists on the Microsoft Dynamics CRM 2011 server, but today I was running unit tests and they failed as I didn’t have this DLL on my build server where the unit tests were being executed.

Bit of investigation found that since I didn’t have Microsoft Dynamics CRM on my build server (it connects to Microsoft Dynamics CRM on another server) I didn’t have one of the prerequisites as part of the Microsoft Dynamics CRM 2011 installation which is the Windows Identity Foundation.

Easy solution was to download the correct version from here and install it on the build server because my CRM tests which are checking CRM business logic would be executed on the CRM Server where this would be present. If your business logic is not intended to run on the CRM server, then I suggest you get the DLL from the installer and reference it within your Visual Studio project and deploy it as part of your build.

Hope that helps!

Greg Olsen
Yellow Duck Guy

Advertisements
Categories: Dynamics CRM
  1. Jawad Bokhari
    May 25, 2011 at 11:55 pm

    Thanks Man,

    I faced exactly the same issue and got it fixed as you said.

    Thanks again

  2. March 31, 2013 at 3:53 pm

    Thanks a lot, it saved me few hours.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: