I am using System.DirectoryServices.AccountManagement.UserPrincipal.Current.EmailAddress in my code, that’s why I need to import the namespace System.DirectoryServices.AccountManagement.
For two xamls the import is working, but wierdly not for the last one.
For the import I added
System.DirectoryServices.AccountManagement
and
<x:String>System.DirectoryServices.AccountManagement</x:String>
to their xamls.
I also tried to install the namespace as a package, but the installation always fails, whichever version.
One of the files that are not showing a validation error has the errormessage “Enter own mail address: The object of the type “System.DirectoryServices.AccountManagement.GroupPrincipal” cannot be converted into “System.DirectoryServices.AccountManagement.UserPrincipal”” (translated).
The one with the validation error says ““DirectoryServices” is not a member of “System”” (translated), even though System.DirectoryServices.AccountManagement is being imported.