Fixing error : The type ‘Microsoft.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse’ is defined in an assembly that is not referenced.

I received this error while trying to compile “Quick Start” sample code provided in CRM 2011 SDK. After searching on Google i found out that i need to install Identity Foundation on my machine for this to work.
So i searched and found a download link for Identity Foundation .



But when i downloaded it and tried to install i got another error as shown below

“Installer encountered an error: 0x80096002

The certificate for the signer of the message is invalid or not found.”

I found out that these downloads are only for windows before windows 8 and i was using windows 8.So i had to find another way.

Later i found out that in order to install Identity Foundation in windows 8 you need to follow the following steps.


  1. Go to “programms and features” from control panel or search directly on start screen and click “settings”
  2. After this click on “Turn windows Features on or off” on the left side of screen. you ¬†will be presented with the following window.
  3. Select “Windows I dentity Foundation 3.5” from the list and click ok. let the windows restart after the feature is turned on.
  4. You can now run the sample code successfully.


Recommended Book

Posted by Sheraz Lodhi in CRM 2011, Microsoft Dynamics CRM, MS Dynamics, 0 comments

Portable Class libraries in .Net 4.5

Portable class libraries are a new project type in .Net  4.5 which allow creating cross platform assemblies . It means that you create a class library which can be used in any of the platform which uses windows for any form factor e.g. Windows PC, Surface, Windows Phone and Xbox.

This makes it easy for the developers so that they don’t have to write down different class libraries when they have to target devices of multiple form factors.

Let us create a portable class library.


  1. If you have visual studio 2012 then you already have a project type “Portable Class Library” . you just need to go to the File menu and click on the New -> Project .
  2. The next step is to select the Target framework , you can select two or more frameworks at a time as shown below
  3. After this you are ready to add your logic to the library .
Posted by Sheraz Lodhi in .Net, .Net 4.5, portable class library, 0 comments