Compilation Pb: 'System.Directory' cannot be found!

G

Guest

Hello,

I'm quite new in the .Net Framework Environment.
I am currently trying to develop a VB.net appli that connects to my domain Active Directory using the "Microsoft.DirectoryServices" namespace, but when I try to compile the source file named "logoff.vb" using the following command:"vbc /reference:Microsoft.VisualBasic.dll logoff.vb" I always get the following error:
"BC30466: Namespace or type 'DirectoryServices' for the Imports 'System.Directory
Services' cannot be found."

Could someone help me find out what I forgot or what is going wrong?
Thanks in advance.
Julien.
 
J

Jon Skeet [C# MVP]

Julien said:
I'm quite new in the .Net Framework Environment. I am currently trying
to develop a VB.net appli that connects to my domain Active Directory
using the "Microsoft.DirectoryServices" namespace, but when I try to
compile the source file named "logoff.vb" using the following
command:"vbc /reference:Microsoft.VisualBasic.dll logoff.vb" I always
get the following error: "BC30466: Namespace or type
'DirectoryServices' for the Imports 'System.Directory Services' cannot
be found."

Could someone help me find out what I forgot or what is going wrong?

You need to add a reference to the System.Directoryservices.dll
assembly, just as you did for the Microsoft.VisualBasic.dll assembly.
 

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