Principal.WindowsImpersonationContext on .Net 6 and EF6

Sundaram Ramachandran 1 Reputation point
2022-08-12T09:05:34.223+00:00

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.

  1. 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.
  2. 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'.'

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
698 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,415 questions
{count} votes