我需要查詢ActiveDirectory以讓用戶選擇名稱並添加到他們正在保存的記錄中。需要對廣告進行身份驗證,然後其他設置對查詢的連接。Novell.Directory.Ldap.NETStandard「:」2.3.7「將無法在.Net Core Project.json中解析
我碰到「Novell.Directory.Ldap.NETStandard」絆倒了。
但是當我嘗試把它拉在它說:「包恢復失敗「。」依賴Novell.Directory.Ldap.NetStandard> = 2.3.7無法解析「。
這是我的project.json中的行:
"Novell.Directory.Ldap.NETStandard": "2.3.7",
我看到這個人在這個崗位嘗試使用它:
C# netcore ldap authentication using Novell.Directory.Ldap.NETStandard library
他是有問題的,但至少它看起來像它試圖連接,所以他一定是能夠安裝project.json中的依賴項。
任何人都知道如何獲得這個依賴項安裝? 我真的想在project.json中手工完成。工具真的好像破解了這些文件。 所以我很猶豫使用:
Install-Package Novell.Directory.Ldap.NETStandard
在包管理器中。
這是到目前爲止我的完整project.json:
{
"dependencies": {
"Hrsa.Core.Generic.Model": "1.0.0-*",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0",
"Microsoft.AspNetCore.Mvc": "1.1.1",
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.1.1",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.AspNetCore.Session": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",
"Microsoft.Extensions.Configuration.FileExtensions": "1.1.0",
"Microsoft.Extensions.Configuration": "1.1.0",
"Microsoft.Extensions.Configuration.Json": "1.1.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
//"Novell.Directory.Ldap.NETStandard": "2.3.0",
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
},
"Swashbuckle.AspNetCore": "1.0.0-rc3",
"Hrsa.Core.Generic.Service": "1.0.0-*",
"Hrsa.Core.Generic.Repository": "1.0.0-*",
//"Microsoft.Extensions.DependencyModel": "1.1.1",
//"AutoMapper": "6.0.2",
//"AutoMapper.Extensions.Microsoft.DependencyInjection": "2.0.1",
"Hrsa.Core.Common": "1.0.0-*"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"web.config",
"Views",
"appsettings.development.json",
"appsettings.production.json",
"appsettings.staging.json"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}