Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to use System.DirectoryServices in a web site project and I'm getting this error:

The type or namespace name 'DirectoryServices' does not exist in the namespace 'System' (are you missing an assembly reference?)

My project has a reference to System.DirectoryServices in web.config:

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

And I do have using System.DirectoryServices in the files where I want to use it.

Does anybody have a clue where to look for the problem?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
502 views
Welcome To Ask or Share your Answers For Others

1 Answer

  1. Right click on References under your solution.
  2. Select Add Reference. The reference can be found under the Framework Assemblies list. Select System.DirectoryServices and click Add.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...