Principal.WindowsImpersonationContext on .Net 6 and EF6
Sundaram Ramachandran
1
Reputation point
Hi,
We are currently migrating our projects which are developed on .NET472 to .NET6.0. We had EF6 used for Oracle DB connection and it has been done via Oracle.Manageddataaccess. Now after we changed the underlying projects, we are getting below error. We found there were two feasible solutions on net but we had some issue.
- Change from Oracle.ManagedDataAccess to Oracle.ManagedDataAccess.Core(this needs application to be moved EFCore). But we cant do this since we cant move all our code from EF6 to EFCore now.
- Add reference to Microsoft.NETCore.Portable.Compatibility, i have added that but still we are getting same error.
System.TypeLoadException: 'Could not load type 'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.'