Andy Creigh
Andy Creigh

Reputation: 113

How can I install System.DirectoryServices for MVC Core 2?

The new core 2 directory services are described here https://learn.microsoft.com/en-gb/dotnet/api/system.directoryservices?view=netcore-2.0

I have Visual Studio 2017 and the Core 2 SDK installed but can't reference the newly added directory services, how do I install these?

Can't find them in object browser. Using PMC install-package System.DirectoryServices gives me v4.0

<ItemGroup>
    <PackageReference Include="System.DirectoryServices" Version="4.0.0" />
</ItemGroup>

and the following warning

Package 'System.DirectoryServices 4.0.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.

Using 'manage packages' only shows the unsupported version by bmars.

Any ideas?

Thanks, Andy

Upvotes: 1

Views: 785

Answers (1)

snickler
snickler

Reputation: 94

Microsoft has a MyGet feed that has a preview package of System.DirectoryServices which should be able to work with ASP.NET Core 2.0

https://dotnet.myget.org/feed/dotnet-core/package/nuget/System.DirectoryServices

Upvotes: 1

Related Questions