This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,899 Users
  • 2,269,649 Discussions
  • 7,916,821 Comments

Discussions

Oracle.ManagedDataAccess 21.3 support for .Net 5 and EF6

User_221RD
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=4.0.0.0, 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!

Answers

  • Alex Keh-Oracle
    Alex Keh-Oracle Product Manager Redwood Shores, CAPosts: 3,165 Employee

    Oracle doesn't support EF6 apps in .NET Core. You will have to upgrade to EF Core or keep your EF app on .NET FW.

    Another alternative is to use the DevArt EF6 provider for Oracle, which supports EF6 on .NET Core.