Oracle Data Provider for .NET 升级后不支持 Oracle 19.0.48.0.0

发布于 2025-01-17 06:39:14 字数 627 浏览 0 评论 0原文

我有一个在Asp.net中构建的应用程序,我们将oracle数据库升级到19c“我们在oracle 11g上工作”,首先给我们以下错误:

无法安装包“Oracle.ManagedDataAccess 21.5.0”。您正在尝试将此包安装到面向“.NETFramework,Version=v4.5”的项目中,但该包不包含任何与该框架兼容的程序集引用或内容文件。如需了解更多信息,请联系软件包作者。

搜索后,我发现Oracle.ManagedDataAccess 21.5.0需要.NET Framework版本5。

无论如何,我将所有项目的目标框架从4.5升级到4.7。 2 然后这个问题就不再出现了。

之后,我尝试安装 Oracle.ManagedDataAccess 19.13.0 并且安装成功,但是当我尝试登录“需要连接到数据库”时,它给我错误消息:

Oracle Data Provider for .NET 不支持 Oracle 19.0.48.0.0

我尝试清理解决方案并重建它,但它没有解决问题。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

给我一枪 2025-01-24 06:39:14

通常,.dll 程序集是从全局程序集缓存 (GAC) 或 .exe 所在的文件夹加载的。 GAC 中的文件优先!

检查您安装了哪个 Oracle.ManagedDataAccess,您可以使用 全局程序集缓存工具 (gacutil.exe)

gacutil /l | findstr Oracle

仔细查看策略文件,它们可能会重定向到较新的版本。

如果您需要加载特定版本的 Oracle.ManagedDataAccess,请参阅如何从 GAC 加载特定版本的程序集

您可以检查加载的 Oracle.ManagedDataAccess 的文件和版本

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

您还可以检查 不同 Oracle 版本的客户端/服务器互操作性支持矩阵 查看哪个客户端版本有效与您的数据库:

在此处输入图像描述

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

迷你仙 2025-01-24 06:39:14

将目标框架升级到 .NET Framework 4.6.2 或更高版本即可解决此问题。无需使用旧版本的包。

输入图片此处描述

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文