azure - System.IO.FileSystem.AccessControl assembly not found in .NET Core 3.0
问题描述
System.IO.FileSystem.AccessControl
assembly not found in .NET Core 3.0.
I am trying to create user in LDAP and when calling CommitChanges
, I get this error
Could not load assembly.
解决方案
System.IO.FileSystem.AccessControl支持到 .NETCore 2.0。
该类 FileSecurity
现在是 .NET Core 的 System.IO.FileSystem.AccessControl 包的一部分。
不再有 File.GetAccessControl
orFile.SetAccessControl
方法,因此您需要 FileSecurity
自己实例化实例。
您必须将其添加System.IO.FileSystem.AccessControl
为 NuGet 包。
CommitChanges 所需的命名空间是
System.DirectoryServices