【问题标题】:Type 'ClientAssertionCertificate' exists in both '...ActiveDirectory.Platform' & '....ActiveDirectory'类型“ClientAssertionCertificate”存在于“...ActiveDirectory.Platform”和“....ActiveDirectory”中
【发布时间】:2020-06-05 14:02:28
【问题描述】:

我有一个 cproj,它使用来自 Microsoft.IdentityModel.Clients.ActiveDirectory 的方法 ClientAssertionCertificate。当我在项目级别执行 msbuild 时,我看到了这个奇怪的错误。

错误 CS0433:“Microsoft.IdentityModel.Clients.ActiveDirectory.Platform, Version=3.12.0.827, Culture=neutral, PublicKeyToken=31bf3856ad364e35”和“Microsoft.IdentityModel.Clients.ActiveDirectory, Version”中都存在“ClientAssertionCertificate”类型=4.3.0.0,文化=中性,PublicKeyToken=31bf3856ad364e3`

我确定我仅指的是 PackageReference Microsoft.IdentityModel.Clients.ActiveDirectory,而不是对具有 Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll 的任何其他包/程序集的引用。

如果你们中有人知道这一点,请告诉我,并且可以指导我应该在代码中的哪个位置进行故障排除。

【问题讨论】:

    标签: msbuild nuget csproj


    【解决方案1】:

    我可以找出问题所在。我的项目中的一个项目引用是使用“IpamAsrExports-master”的 PackageReference。此包中包含程序集“Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll”。在我将包“IpamAsrExports-master”升级到更新版本后,它解决了这个问题。

    【讨论】:

      猜你喜欢
      • 2016-02-28
      • 1970-01-01
      • 1970-01-01
      • 2012-02-29
      • 1970-01-01
      • 2017-04-05
      • 2011-04-02
      • 2017-01-13
      • 2012-06-29
      相关资源
      最近更新 更多