System.DirectoryServices

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?
 
M

Marc Scheuner [MVP ADSI]

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
 
J

Jeremy Chapman

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top