Where is the Microsoft.IdentityModel dll

AzureIdentityWif

Azure Problem Overview


I have installed the Windows Identity Foundation but can't find the Microsoft.IdentityModel dll. According to the Azure Hands-on-Labs it should just be in Add Reference in VS2010. However it's not there.

I also looked in c:\Program Files(x86)\Windows Identity Foundation* and it's not in there (or the 64 bit program files folder).

Help!

Azure Solutions


Solution 1 - Azure

How about a NuGet Windows Identity Foundation. Just add it you you project and away you go! Its one of the MS owned NuGets so should be maintained accordingly.

EDIT: In Windows 8 Windows Identity Foundation is installed (enabled) by turning a windows feature on in Control Panel > All Control Panel Items > Programs and Features > Turn Windows feature on or off the feature is Windows Identity Foundation 3.5. Installers linked in the answer above will not work on Windows 8

Solution 2 - Azure

Have you installed Windows Identity Foundation and the companion WIF SDK?

Solution 3 - Azure

If you've installed the WIF SDK, try :

C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\
   Microsoft.IdentityModel.dll

Solution 4 - Azure

For Windows 10:

Right-click the taskbar Windows logo, select 'Programs and Features'.

Click 'Turn Windows Features on or off'

In the dialog box that appears, scroll down or resize the window and check the box next to 'Windows Identity Foundation 3.5'

Click OK.

This activates the required DLLs. Apparently Windows 10 keeps all of those features in the windows installation so that it can activate and deactivate them on demand.

Solution 5 - Azure

I had this problem, but fixed it by referencing the DLL from "C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll"

Go to reference properties and set Copy Local to True for the DLL. The DLL will now be included in the azure package.

Solution 6 - Azure

In Windows 8.1 64bit, look under C:\Windows\ADFS

Solution 7 - Azure

In Windows 8 and up there's a way to enable the feature from the command line without having to download/install anything explicitly by running the following:

dism /online /Enable-Feature:Windows-Identity-Foundation

And then find the file by running the following at the root of your Windows disk:

dir /s /b Microsoft.IdentityModel.dll

Solution 8 - Azure

I had a similar problem. I got an exception "Type is not resolved for member 'Microsoft.IdentityModel.Claims.ClaimsPrincipal, Microsoft.IdentityModel, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35'.".

I tried to run the ASP.NET application from Visual Studio, which was a reference to a local copy of Microsoft.IdentityModel.dll.

I did not want to install the SDK and I had to copy the library to the directory "C: \ Program Files \ Common Files \ Microsoft Shared \ DevServer \ 10.0" and restart Visual Studio.

Solution 9 - Azure

Check namespace mapping changed after 3.5 see below URL for details. http://msdn.microsoft.com/en-us/library/jj157091.aspx

Solution 10 - Azure

Install Both of the below links

  1. Windows Identity Foundation

Note: (For Vista and Windows Server 2008 >>> Windows6.0 and For Windows 7 and Windows Server 2008 R2, >>> Windows6.1. )

  1. Windows Identity Foundation SDK

    Note: Download the 3.5 version for Visual Studio 2008 and .NET 3.5, the 4.0 version for Visual Studio 2010 and .NET 4.0.

Then Only, You will able to get the assembly called Microsoft.IdentityModel

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMooryView Question on Stackoverflow
Solution 1 - AzureTaras AleninView Answer on Stackoverflow
Solution 2 - AzureEugenio PaceView Answer on Stackoverflow
Solution 3 - AzureTJ AmasView Answer on Stackoverflow
Solution 4 - AzureMonty WildView Answer on Stackoverflow
Solution 5 - AzureJeppebmView Answer on Stackoverflow
Solution 6 - AzureCarlSView Answer on Stackoverflow
Solution 7 - AzureNikita R.View Answer on Stackoverflow
Solution 8 - AzureEdward WeinertView Answer on Stackoverflow
Solution 9 - AzureSandipView Answer on Stackoverflow
Solution 10 - AzureSurendra TaraiView Answer on Stackoverflow