c# - 我在哪里可以找到要添加到我的项目中的 "ActiveDirectory"引用?

标签 c# reference active-directory namespaces

关闭。这个问题需要 details or clarity 。它目前不接受答案。












想改善这个问题吗?添加详细信息并通过 editing this post 澄清问题。

4年前关闭。




Improve this question




我在使用时遇到问题

System.DirectoryServices.ActiveDirectory

我的项目中的命名空间。视觉工作室给了我一个错误:
The type or namespace name 'ActiveDirectory' does not exist in the namespace 'System.DirectoryServices'

我需要添加引用来解决这个问题。
谢谢你的帮助

最佳答案

在解决方案资源管理器中展开您的项目,然后右键单击“引用”>“添加引用”并在“程序集”下查找“DirectoryServices”。

添加后,您可能应该使用 using 语句来引用页面顶部的事件目录。

using System.DirectoryServices.ActiveDirectory

关于c# - 我在哪里可以找到要添加到我的项目中的 "ActiveDirectory"引用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45619186/

相关文章:

c# - 在 Try/Catch 中包含 ExecuteReader 使其成功?

c# - 调用 sync 和 async 方法有 await 区别?

c# - 反射(reflection)具有在不同程序集中定义的类型属性的类

Javascript - 删除一个对象作为函数的参数

linux - 从 Windows 或 Linux 设备使用 Python 2.7 查询 Windows Active Directory

powershell - 导入 CSV 和 Foreach 以使用 Get-ADUser

C# - 从 JSON 反序列化,结果始终是一个空对象

c# - 一个对象类型的变量是一个引用吗,仅此而已?或者它也可以是对引用的引用?

c++ - 从 const 引用参数存储成员变量

c++ - 如何将此 LDAP 代码从 VBS 转换为 C++