Reputation: 1071
I'm getting this exception when I run a .NET CORE REST API project in Visual Studio.
It cannot find System.Security.Principal.WindowsImpersonationContext
, so I install System.Security.Principal
from NuGet and still get the same error. If I look at the package, the type Principal.WindowsImpersonationContext
is not there. Where can I find a package with this type? According to this the type should be in the namespace.
An exception of type 'System.TypeLoadException' occurred in Microsoft.AnalysisServices.AdomdClient.dll but was not handled in user code Could not load type 'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Upvotes: 0
Views: 415
Reputation: 1348
The type Principal.WindowsImpersonationContext
is not available for .Net Core 3.1. In the same link you shared it says .Net Framework 4.8, if you try to switch to .Net Core using the upper left dropdown you'll see the message that this type is no available.
I found this question where they're talking about it. I hope it helps.
Upvotes: 2