skip to Main Content

I have an application built in Asp.net, we upgraded the oracle database to 19c "where we were working on oracle 11g", first give us the below error:

Could not install package ‘Oracle.ManagedDataAccess 21.5.0’. You are trying to install this package into a project that targets ‘.NETFramework, Version=v4.5’, but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

After searching I found the Oracle.ManagedDataAccess 21.5.0 requires .NET Framework version 5.

Anyway, I upgrade the target framework for all projects from 4.5 to 4.7.2 and that issue didn’t appear anymore.

After that, I tried to install Oracle.ManagedDataAccess 19.13.0 and it was installed successfully but when I try to login "need to connect to the database" it give me the error message:

Oracle Data Provider for .NET does not support Oracle 19.0.48.0.0

I tried to clean the solution and rebuild it, but it didn’t fix the problem.

2

Answers


  1. Upgrading your target framework to .NET Framework 4.6.2 or later is the fix. No need to use an old version of the package.

    enter image description here

    https://www.nuget.org/packages/Oracle.ManagedDataAccess

    Login or Signup to reply.
  2. Typically .dll assemblies are loaded either from Global Assembly Cache (GAC) or from folder where your .exe is located. The files from GAC take precedence!

    Check which Oracle.ManagedDataAccess you have installed, you can use the Global Assembly Cache Tool (gacutil.exe).

    gacutil /l | findstr Oracle
    

    Have a careful look at the Policy Files, they may redirect to a newer version.

    If you need to load a specific version of Oracle.ManagedDataAccess see How to load specific version of assembly from GAC

    You can check the file and version of loaded Oracle.ManagedDataAccess with

    connection.GetType().Assembly.Location
    connection.GetType().Assembly.FullName
    

    You may also check Client / Server Interoperability Support Matrix for Different Oracle Versions to see which client version works with your database:

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search