Last post Aug 15, 2011 10:00 AM by harrisrasheed123
Aug 12, 2011 06:11 PM|harrisrasheed123|LINK
I am getting the following error
The type or namespace name 'DirectorySearcher' could not be found (are you missing a using directive or an assembly reference?)
I have the following namespaces imported.
Shouldn't it be fine since I imported System.DirectoryServices?
Aug 13, 2011 01:02 AM|Bryan Strader|LINK
Check your solution explorer to see if System.DirectoryServices exists under references.
Aug 13, 2011 01:23 AM|harrisrasheed123|LINK
I checked and it wasn't but I added System.DirectoryServices.Accounting.
How do I get the reference for just System.DirectoryServices?
Aug 13, 2011 02:36 PM|Bryan Strader|LINK
If you right click and say add reference, then choose the .NET tab, under that should exists all System namespaces. System.DirectoryServices should be there. I just checked but Im running VS2010 .Net 4.0
Aug 14, 2011 12:24 AM|harrisrasheed123|LINK
Unfortunately the System.DirectoryServices DLL is not in the .NET tab.
Only the System.DirectoryServices.Accounting is the closest. Do you know why this is?
Aug 15, 2011 10:00 AM|harrisrasheed123|LINK
I figured it out. I had to download the DLL online and add it to reference from Browse.