asp.net Oracle.ManagedDataAccess系统找不到指定的文件

db2dz4w8  于 2023-02-20  发布在  .NET
关注(0)|答案(2)|浏览(245)

在我基于.net 3.5构建的网站项目中,当我通过在web.config中添加以下内容来添加对Oracle.ManagedDataAccess.dll的引用时

<add assembly="Oracle.ManagedDataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/>

则会给予此错误

Configuration Error 
  Description: An error occurred during the processing of a configuration file required to     service this request. Please review the specific error details below and modify your configuration file appropriately. 

 Parser Error Message: Could not load file or assembly 'Oracle.ManagedDataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
lymnna71

lymnna711#

此错误出现在.net版本3.5中。解决方法是将.net版本升级到.net 4.0或更高版本

j2cgzkjk

j2cgzkjk2#

将我的项目版本从.NET 4.5.2升级到.NET 4.8,然后将OracleManagedDataAccess nuget包安装到解决方案中(似乎未安装)
这解决了错误。

相关问题