You should reference this assembly : System.DirectoryServices.dll , then it will work .