Error using System.DirectoryServices
am 09.01.2008 19:24:06 von 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:
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
Re: Error using System.DirectoryServices
am 09.01.2008 20:31:32 von joseph.e.kaplan
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 Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Nam" wrote in message
news:729CA2B3-D1AA-4E0B-B398-E856608ADFAC@microsoft.com...
> 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:
>
>
>
> 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
Re: Error using System.DirectoryServices
am 10.01.2008 17:04:02 von Nam
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
"Joe Kaplan" wrote:
> 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 Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services Programming"
> http://www.directoryprogramming.net
> --
> "Nam" wrote in message
> news:729CA2B3-D1AA-4E0B-B398-E856608ADFAC@microsoft.com...
> > 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:
> >
> >
> >
> > 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
>
>
>