DirectoryServices classes not being recognized

A

aamirghanchi

Hi,

I had .Net 1.1 app that worked fine. I recently migrated it to 2.0 but
am getting compilation errors, among which DirectoryServices classes
are not being recognized by the VS 2005 at build time. I can clearly
see the reference to System.DirectoryServices 2.0.0 GAC in the
reference list and there is no error where the Imports
System.DirectoryServices statement is.
Its listing errors all over for the classes under its namespace:

Any suggestions will be appreciated.

TIA.

Type 'ResultPropertyCollection' is not defined.
Type 'ResultPropertyValueCollection' is not defined.
Type 'DirectoryEntry' is not defined.
Type 'DirectorySearcher' is not defined.
Type 'SearchResult' is not defined.
 
G

Guest

Hi,

I had .Net 1.1 app that worked fine. I recently migrated it to 2.0 but
am getting compilation errors, among which DirectoryServices classes
are not being recognized by the VS 2005 at build time. I can clearly
see the reference to System.DirectoryServices 2.0.0 GAC in the
reference list and there is no error where the Imports
System.DirectoryServices statement is.
Its listing errors all over for the classes under its namespace:

Any suggestions will be appreciated.

TIA.

Type 'ResultPropertyCollection' is not defined.
Type 'ResultPropertyValueCollection' is not defined.
Type 'DirectoryEntry' is not defined.
Type 'DirectorySearcher' is not defined.
Type 'SearchResult' is not defined.

Solution Explorer - References - Add Reference
 
A

aamirghanchi

Solution Explorer - References - Add Reference- Hide quoted text -

- Show quoted text -

Thanks Alexey, but like I said it is already there in the reference
list and I have tried removing and adding it back many times through
the solution you proposed.
thanks any way.
 
G

Guest

Thanks Alexey, but like I said it is already there in the reference
list and I have tried removing and adding it back many times through
the solution you proposed.
thanks any way.- Hide quoted text -

- Show quoted text -

My apologies, I misread your post.

Looks strange then... Are you sure that the .NET version is correctly
configured in IIS?
 
A

aamirghanchi

My apologies, I misread your post.

Looks strange then... Are you sure that the .NET version is correctly
configured in IIS?- Hide quoted text -

- Show quoted text -

yep, its ASP.net version 2.0.50727 as shown on the IIS6 manager
I am getting the compilation errors (while building solution) before
it even hits the IIS.
 
G

Guest

I recently migrated it to 2.0 but :

Well, I think I know what the problem is and it's not because of
DirectoryServices.

You have converted the project, and because of the "new compilation
model" some references could be broken

Issue 1: Code-behind class file (CB-CB) references
Issue 2: Stand-alone class file (SA-CB) references
http://msdn2.microsoft.com/en-us/library/aa479312.aspx

Migrating to ASP.NET 2.0
http://msdn2.microsoft.com/en-us/asp.net/aa336622.aspx

I'd also recommend converting your Web Site Project to be ASP.NET Web
Application project. (You have to create new project and copy all the
classes and web forms)
 
A

aamirghanchi

Well, I think I know what the problem is and it's not because of
DirectoryServices.

You have converted the project, and because of the "new compilation
model" some references could be broken

Issue 1: Code-behind class file (CB-CB) references
Issue 2: Stand-alone class file (SA-CB) referenceshttp://msdn2.microsoft.com/en-us/library/aa479312.aspx

Migrating to ASP.NET 2.0http://msdn2.microsoft.com/en-us/asp.net/aa336622.aspx

I'd also recommend converting your Web Site Project to be ASP.NET Web
Application project. (You have to create new project and copy all the
classes and web forms)

Alexey, I have decided to converting it to Web Application Project.
thanks for the good leads. I will notify this usergroup of any
success.

thanks again.
 
A

aamirghanchi

Alexey, I have decided to converting it to Web Application Project.
thanks for the good leads. I will notify this usergroup of any
success.

thanks again.- Hide quoted text -

- Show quoted text -

SOLUTION:
Wierd thing happened but it solved the build error problem.
I re-converted the original 1.1 project to 2.0 in VS 2005 but this
time commented out the references to Crystaldecisions assemblies in
the web.config before I did the conversion. I don't know what does
CrystalDecisions has to do with the System.DirectoryServices but that
did the trick. I removed the ref to CrystalDecisions assemblies
because that was another set of errors I was getting during the build
time in addition to System.DirectoryServices. Now I have loads and
loads of warnings to deal with but thats another story :)
 

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

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top