Error using System.DirectoryServices

  • Thread starter Thread starter Nam
  • Start date Start date
N

Nam

On my ASP.NET 2.0 website project on VS 2005, I am getting the following
error when building the solution:

“The type or namespace name 'ADSI' does not exist in the namespace
'myNameSpace' (are you missing an assembly reference?)â€

I do have the following added to my web.config file:

<add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/>

The build was working ok before I added another website project to the
solution. I am using Visual SourceSafe 2005. I had to checkout the solution,
add the new website project to the Visual SourceSafe and check in the
solution.

Environment: Windows XP professional SP2, .NET Framework 2.0, VS 2005 SP1, C#

Any help will be appreciated.

Thanks,
Nam
 
It sounds like you have a reference to something other than
System.DirectoryServices, as that assembly and namespace don't use the name
ADSI anywhere. Do you have an interop assembly for activeds.tlb or
something?

Joe K.
 
Joe,

Thank you for your response. You are correct. After reading your response, I
found out that our code is referencing to myNamespace.ADSI. I have a backup
copy of my website project. After I copied the backup copy of my project to
the working folder (we are using Visual SourceSafe), the solution compiled
successfully again. So, I am still not clear as to why the project was giving
the compile error mentioned in my original posting. I had checked that all
the references were there.

Nam
 
Back
Top