Forum Stats

  • 3,875,076 Users
  • 2,266,801 Discussions


Oracle.ManagedDataAccess 21.3 support for .Net 5 and EF6

User_221RD Member Posts: 1 Green Ribbon

Hi, my company is looking to upgrade to .Net 5 for our .Net Framework 4.7.2 application. However, we do not want to upgrade our ODP.Net and EF6 to ODP.Net Core and EF Core. Doing so, we encountered the following error when we tried to target 'net5.0-windows' and keeping ODP.Net and EF6:

Unhandled exception. System.TypeLoadException: Could not load type 'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

  at OracleInternal.ConnectionPool.PoolManager`3.CreateNewPRThreadFunc(Object state)

  at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()

  at System.Threading.ThreadPoolWorkQueue.Dispatch()

  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Does this mean we have no choice to upgrade ODP.Net Core and EF Core if we want to upgrade our application to .Net 5 or there are other ways we are not aware of?

Thank you for any help in advance!