【问题标题】:Where is the Microsoft.IdentityModel dllMicrosoft.IdentityModel dll 在哪里
【发布时间】:2011-03-01 09:42:38
【问题描述】:

我已安装 Windows Identity Foundation,但找不到 Microsoft.IdentityModel dll。根据 Azure Hands-on-Labs,它应该只是在 VS2010 的添加参考中。但是它不存在。

我还查看了 c:\Program Files(x86)\Windows Identity Foundation*,但它不在其中(或 64 位程序文件文件夹)。

救命!

【问题讨论】:

  • 我已通过在记事本中添加对 csproj 文件的以下引用来解决此问题:( 它工作...

标签: azure identity wif


【解决方案1】:

在 Windows 8 及更高版本中,有一种方法可以从命令行启用该功能,而无需通过运行以下命令显式下载/安装任何内容:

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

然后在 Windows 磁盘的根目录下运行以下命令找到该文件:

dir /s /b Microsoft.IdentityModel.dll

【讨论】:

    【解决方案2】:

    对于 Windows 10:

    右键单击任务栏 Windows 徽标,选择“程序和功能”。

    点击“打开或关闭 Windows 功能”

    在出现的对话框中,向下滚动或调整窗口大小并选中“Windows Identity Foundation 3.5”旁边的框

    点击确定。

    这将激活所需的 DLL。显然,Windows 10 将所有这些功能保留在 Windows 安装中,以便它可以按需激活和停用它们。

    【讨论】:

      【解决方案3】:

      安装以下两个链接

      1. Windows Identity Foundation

        注意:(适用于 Vista 和 Windows Server 2008 >>> Windows6.0 和 对于 Windows 7 和 Windows Server 2008 R2,>>> Windows6.1。 )

      2. Windows Identity Foundation SDK

        注意:下载 Visual Studio 2008 和 .NET 3.5 的 3.5 版本,Visual Studio 2010 和 .NET 4.0 的 4.0 版本。

      只有这样,您才能获得名为 Microsoft.IdentityModel

      的程序集

      【讨论】:

        【解决方案4】:

        检查 3.5 后更改的命名空间映射,请参阅下面的 URL 了解详细信息。 http://msdn.microsoft.com/en-us/library/jj157091.aspx

        【讨论】:

        • 这只是一个链接。提供具体答案。
        • 我同意提供与问题相关的摘录或摘要。也就是说,指向命名空间映射的指针正是我所需要的……所以 +1 :-)。
        【解决方案5】:

        在 Windows 8.1 64bit 中,在 C:\Windows\ADFS 下查看

        【讨论】:

        • @PlasmaPower 你必须佩服这种精神。 :)
        【解决方案6】:

        如果您已安装 WIF SDK,请尝试:

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

        【讨论】:

          【解决方案7】:

          NuGet Windows Identity Foundation 怎么样。只需将它添加到您的项目中即可!它是 MS 拥有的 NuGet 之一,因此应相应维护。

          编辑:在 Windows 8 中,通过在控制面板 > 所有控制面板项目 > 程序和功能 > 打开 Windows 功能或打开 Windows 功能来安装(启用)Windows Identity Foundation关闭该功能是Windows Identity Foundation 3.5。上述答案中链接的安装程序将无法在 Windows 8 上运行

          【讨论】:

          • Win8 程序/功能中的工具提示说它适用于 .NET 3.5 或 4.0 的 WIF。 WIF 已集成到 .NET 4.5 中,因此如果您使用 VS2012/.NET 4.5 进行开发,只需添加对 System.IdentityModel/System.IdentityModel.Services 的引用即可。
          • 包含这个 NuGet 包允许我在不使用 VM 的情况下将网站部署到 Azure,并且仍然可以访问 microsoft.identitymodel.dll - 谢谢!
          • 如有疑问,Nuget!
          • 在 Windows 10 中,这不再是 Windows 功能。使用 NuGet 包选项在 Windows 10 上效果很好。
          • @KoenZomers,实际上它 Windows 10 功能。右键单击任务栏 Windows 徽标,选择“程序和功能”,单击“打开或关闭 Windows 功能”,然后在出现的对话框中,选中“Windows Identity Foundation 3.5”旁边的框
          【解决方案8】:

          我遇到了类似的问题。我得到一个异常“成员'Microsoft.IdentityModel.Claims.ClaimsPrincipal,Microsoft.IdentityModel,版本= 3.5.0.0,文化=中性,PublicKeyToken = 31bf3856ad364e35'的类型未解析。”。

          我尝试从 Visual Studio 运行 ASP.NET 应用程序,它是对 Microsoft.IdentityModel.dll 本地副本的引用。

          我不想安装 SDK,我不得不将库复制到目录“C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0”并重新启动 Visual Studio。

          【讨论】:

          • 这并不重要,但您只需要重新启动 ASP.NET 开发服务器,而不是所有的 Visual Studio。
          【解决方案9】:

          你安装了Windows Identity Foundation和配套的WIF SDK吗?

          【讨论】:

          【解决方案10】:

          我遇到了这个问题,但通过引用 DLL 来解决它 "C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll"

          转到引用属性并将 DLL 的 Copy Local 设置为 True。 DLL 现在将包含在 azure 包中。

          【讨论】:

            猜你喜欢
            • 2011-04-04
            • 2013-10-17
            • 2012-12-23
            • 2013-02-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2011-03-15
            相关资源
            最近更新 更多