07-23-2023, 05:45 AM
I had the same issue here using **'System.Security.Principal.Windows'** version **4.7.0**. For some reason when I installed the nuget package it was referecing the dll from the folder: C:\Users\\{your-user}\\.nuget\packages\system.security.principal.windows\4.7.0\\**ref**\\netstandard2.0\System.Security.Principal.Windows.dll **then I changed to reference the dll** from the folder C:\Users\\{your-user}\\.nuget\packages\system.security.principal.windows\4.7.0\\**lib**\\netstandard2.0\System.Security.Principal.Windows.dll and everything worked just fine! So I copied the dll from the **lib** folder to my project and made a direct reference.