简体   繁体   中英

Where can I find Microsoft.IdentityModel.Extensions.dll library?

I'm searching for Microsoft.IdentityModel.Extensions library. In documentation that I'm reading they suggest that it should be available in my GAC, but its not. I'm using Visual Studio 2012.

Where can I find it?

Right click your project and opt for Manage NuGet Package and look for the following extension Windows Identity Foundation

Alternately, you can download it from here . Afterwards reinstalling the NuGet packages may be necessary: Update-Package –reinstall

In addition to Štefan Bartoš answer, my problem was fixed only after installing WIF using Visual Studio Installer. You can find it in Installation Details for SharePoint.

在此处输入图片说明

Search and install Windows Identity Foundation. One possibility is to use Nuget

PM> Install-Package Microsoft.IdentityModel

To include Microsoft.IdentityModel.Extensions for WIF runtime support, perform the following steps:

  1. Download and install the WIF runtime and SDK for .NET Framework 4.0.
    \nNote that the Microsoft.IdentityModel assembly is located\nunder the %Program Files%\\Reference Assemblies\\\nMicrosoft\\Windows Identity Foundation\\v3.5 folder. \n
  2. Add reference to the Microsoft.IdentityModel, System.IdentityModel, and System. Configuration assemblies

Okay after googling until my eyes bled and not finding a solution, I was able to fix the error not displaying my sharepoint 2013 site by taking the following steps:

  1. Go to the folder path > C:\\Windows\\Microsoft.NET\\assembly\\GAC_MSIL\\Microsoft.IdentityModel.Extensions\\v4.0_2.0.0.0__69c3241e6f0468ca

  2. If the path above its empty you have to find a copy of the Microsoft.IdentityModel.Extensions.dll and place it in the path above, in my case I had second working virtual machine so I copied the .DLL from there.

    In Windows 2008 server you could find a copy of the Microsoft.IdentityModel.Extensions.dll in the path below:

C:\\inetpub\\wwwroot\\wss\\VirtualDirectories\\Portal80\\bin

If you are having this problem in relation to Sharepoint development, then this cold be a solution.

My application was one that interacted with Sharepoint, originally using the AppForSharePointWebToolkit nuget package (in VS2013). When I tried to add this to my solution on a new development machine (using VS2017), I got the following error:

Failed to add reference. The package 'AppForSharePointWebToolkit' tried to add a framework reference to 'Microsoft.IdentityModel' which was not found in the GAC.

I finally found this Nuget package: https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM , which is by Microsoft and seems to give me all my Sharepoint classes, without requiring 'Microsoft.IdentityModel'.

My problem was to install Windows Identity Foundation from Visual Studio 2019. It was shown at VS startup. I tried to find it in VS Installer, but with no luck. However, you can check that you have installed this package in Program and features(appwiz.cpl). 程序和功能中的 Microsoft 身份扩展

So, do not ignore VS warning.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM