C# 在哪里可以找到 Microsoft.IdentityModel.Extensions.dll 库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16692181/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where can I find Microsoft.IdentityModel.Extensions.dll library?
提问by ?ukaszW.pl
I'm searching for Microsoft.IdentityModel.Extensionslibrary. 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.
我正在寻找Microsoft.IdentityModel.Extensions图书馆。在我正在阅读的文档中,他们建议它应该在我的 GAC 中可用,但它不是。我正在使用 Visual Studio 2012。
Where can I find it?
我在哪里可以找到它?
采纳答案by Nair
Right click your project and opt for Manage NuGet Package and look for the following extension Windows Identity Foundation
右键单击您的项目并选择 Manage NuGet Package 并查找以下扩展 Windows Identity Foundation
Alternately, You can download it from herespecifically under Prerequisites
或者,您可以从这里专门在先决条件下下载它
回答by JeffRSon
Search and install Windows Identity Foundation. One possibility is to use Nuget
搜索并安装 Windows Identity Foundation。一种可能性是使用 Nuget
PM> Install-Package Microsoft.IdentityModel
回答by Jatin patil
To include Microsoft.IdentityModel.Extensionsfor WIF runtime support, perform the following steps:
要包含Microsoft.IdentityModel.ExtensionsWIF 运行时支持,请执行以下步骤:
- Download and install the WIF runtime and SDK for .NET Framework 4.0.
Note that the Microsoft.IdentityModel assembly is located under the %Program Files%\Reference Assemblies\ Microsoft\Windows Identity Foundation\v3.5 folder.
- Add reference to the Microsoft.IdentityModel, System.IdentityModel, and System. Configuration assemblies
- 下载并安装适用于 .NET Framework 4.0 的 WIF 运行时和 SDK。
Note that the Microsoft.IdentityModel assembly is located under the %Program Files%\Reference Assemblies\ Microsoft\Windows Identity Foundation\v3.5 folder.
- 添加对 Microsoft.IdentityModel、System.IdentityModel 和 System 的引用。配置组件
回答by rey garrido
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:
好吧,在谷歌搜索直到我的眼睛流血并且没有找到解决方案之后,我能够通过执行以下步骤修复未显示我的 sharepoint 2013 站点的错误:
Go to the folder path > C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.IdentityModel.Extensions\v4.0_2.0.0.0__69c3241e6f0468ca
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:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.IdentityModel.Extensions\v4.0_2.0.0.0__69c3241e6f0468ca
如果上面的路径为空,您必须找到 Microsoft.IdentityModel.Extensions.dll 的副本并将其放在上面的路径中,在我的情况下,我有第二个工作虚拟机,所以我从那里复制了 .DLL。
在 Windows 2008 服务器中,您可以在以下路径中找到 Microsoft.IdentityModel.Extensions.dll 的副本:
C:\inetpub\wwwroot\wss\VirtualDirectories\Portal80\bin
C:\inetpub\wwwroot\wss\VirtualDirectories\Portal80\bin
回答by JohnB
If you are having this problem in relation to Sharepoint development, then this cold be a solution.
如果您遇到与 Sharepoint 开发相关的这个问题,那么这就是一个解决方案。
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:
我的应用程序是一个与 Sharepoint 交互的应用程序,最初使用 AppForSharePointWebToolkit nuget 包(在 VS2013 中)。当我尝试将其添加到新开发机器(使用 VS2017)上的解决方案中时,出现以下错误:
Failed to add reference. The package 'AppForSharePointWebToolkit' tried to add a framework reference to 'Microsoft.IdentityModel' which was not found in the GAC.
添加引用失败。“AppForSharePointWebToolkit”包尝试添加对“Microsoft.IdentityModel”的框架引用,但在 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'.
我终于找到了这个 Nuget 包:https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM,它是微软的,似乎给了我所有的 Sharepoint 类,而不需要“Microsoft.IdentityModel”。
回答by ?tefan Barto?
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).

我的问题是从 Visual Studio 2019 安装 Windows Identity Foundation。它在 VS 启动时显示。我试图在 VS 安装程序中找到它,但没有运气。但是,您可以在 Program and features(appwiz.cpl) 中检查您是否已安装此包。

So, do not ignore VS warning.
所以,不要忽视 VS 警告。

