System.DirectoryServices

  • Thread starter Thread starter Jeremy Chapman
  • Start date Start date
J

Jeremy Chapman

I've created a csharp class library, and added System.DirectoryServices as a
using clause, but I get the error that the type or namespace name
'DirectoryServices' does not exist in the class or namespace 'system'.

I've done this before from a winform app, so I must be missing something.
suggestions?
 
I've created a csharp class library, and added System.DirectoryServices as a
using clause, but I get the error that the type or namespace name
'DirectoryServices' does not exist in the class or namespace 'system'.

Yes, you also need to add a reference to the assembly to your project
- just specifying it in the using clause isn't good enough.

Go to your project tree, pick your project, and the "References" node
below the project node. Right-click to add a reference, and find the
System.DirectoryServices assembly, add it.

Marc
 
Thanks, I'm a fool.

Marc Scheuner said:
Yes, you also need to add a reference to the assembly to your project
- just specifying it in the using clause isn't good enough.

Go to your project tree, pick your project, and the "References" node
below the project node. Right-click to add a reference, and find the
System.DirectoryServices assembly, add it.

Marc
 
Back
Top