System.DirectoryServices is not recognised in the namespace 'System'

后端 未结 9 1398
一整个雨季
一整个雨季 2021-02-05 02:23

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

The type or namespace name \'DirectoryServices

9条回答
  •  花落未央
    2021-02-05 03:01

    These problems occur when you are working with older .net version and trying to build with the latest IDE

    It depends on which version of IDE you are using and also the current code version.

    Check the web config,

    In my case, I was using the Latest version i.e 4.7 and directoryService assembly are still referring to C#4.0.

    Add below if you are using Latest version of id i.e 4.7

      
      
    
    
            
    
    
     
          
    
      
    

提交回复
热议问题