Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to find System.DirectoryServices in ASP.NET Core 2.0?

I need to run some Active Directory queries with a new ASP.NET Core 2.0 web application. Microsoft's documentation says the System.DirectoryServices.AccountManagement libraries are available as part of .NET Core 2.0.

How do I find the associated packages in NuGet which include this namespace? The only one I see in NuGet is an unsupported library by someone other than Microsoft.

like image 364
bperniciaro Avatar asked Aug 22 '17 21:08

bperniciaro


3 Answers

I have a better solution for this thread. I found a Nuget package (it's in Pre-Release) called "Microsoft.Windows.Compatibility" that provides the System.DirectoryServices namespace you are looking for. Just search Nuget, make sure you have the Pre-Release option checked, and you will find it. Most everything will work once you get it. Just make sure to update the package later on, when it's finalized. Hope that helps someone, took me a couple weeks to track it down.

like image 80
James Hodges Avatar answered Nov 15 '22 00:11

James Hodges


Unfortunately, System.DirectoryServices are scheduled for .net core 2.1 not .net core 2.0.

https://github.com/dotnet/corefx/issues/2089 is the original issue log

like image 8
Win Avatar answered Nov 15 '22 01:11

Win


As I see it now in NetCore 2.2 there is support for this package:

System.DirectoryServices.AccountManagement

You can find it in nuget.

Author is Microsoft and

Date Published: Tuesday, May 29, 2018 (5/29/2018)

like image 1
cnom Avatar answered Nov 15 '22 01:11

cnom