无法更新 Abp.Zero.Ldap NuGet 包

Unable to update Abp.Zero.Ldap NuGet package

我们正在尝试使用 Visual Studio 和 NuGet 包管理器更新包 "Abp.Zero.Ldap"。我得到一个错误:

Error: Unable to resolve dependency 'System.DirectoryServices.AccountManagement'. Source(s) used: 'nuget.org', 'Project MyGet', 'Microsoft Visual Studio Offline Packages'.

并使用 Visual Studio 和 NuGet 包管理器更新另一个包 "TM.Common.Text.Template"。我得到一个错误:

Error: Unable to resolve dependencies. 'TM.Common.Text 1.0.1709.2303' is not compatible with 'TM.Common.Text.Template 1.0.1804.1301 constraint: TM.Common.Text (>= 1.0.1804.1301)'.

你能帮我们解决这个问题吗?

本期回答:https://github.com/aspnetboilerplate/aspnetboilerplate/issues/3217

Abp.Zero.Ldap package depends on below packages and they are pre releases.

  • System.DirectoryServices.AccountManagement (>= 4.5.0-preview1-26216-02)
  • System.DirectoryServices.Protocols (>= 4.5.0-preview1-26216-02)

So if you include pre release packages while running Install-Package, it should work. See https://docs.microsoft.com/en-us/nuget/create-packages/prerelease-packages#installing-and-updating-pre-release-packages.

Install-Package Abp.Zero.Ldap -IncludePrerelease