Oracle Data Provider for .NET 升级后不支持 Oracle 19.0.48.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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通常,
.dll
程序集是从全局程序集缓存 (GAC) 或.exe
所在的文件夹加载的。 GAC 中的文件优先!检查您安装了哪个
Oracle.ManagedDataAccess
,您可以使用 全局程序集缓存工具 (gacutil.exe)。仔细查看策略文件,它们可能会重定向到较新的版本。
如果您需要加载特定版本的
Oracle.ManagedDataAccess
,请参阅如何从 GAC 加载特定版本的程序集您可以检查加载的
Oracle.ManagedDataAccess
的文件和版本您还可以检查 不同 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).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 GACYou can check the file and version of loaded
Oracle.ManagedDataAccess
withYou may also check Client / Server Interoperability Support Matrix for Different Oracle Versions to see which client version works with your database:
将目标框架升级到 .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.
https://www.nuget.org/packages/Oracle.ManagedDataAccess