【问题标题】:Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format. Ncache无法加载文件或程序集“Oracle.DataAccess”或其依赖项之一。试图加载格式不正确的程序。缓存
【发布时间】:2014-01-29 07:08:06
【问题描述】:

我已经下载了 64 位 Ncache 应用程序,因为我有 64 位 Windows 7。我正在使用 Ncache 创建一个示例应用程序。 Ncache 附带的示例运行良好。我正在使用 Ncache 本地缓存开发自己的应用程序。当我通过 Visual Studio 2010 运行该应用程序时,我收到以下错误:

无法加载文件或程序集“Oracle.DataAccess”或其依赖项之一。试图加载格式不正确的程序。

我也安装了最新版本的 oracle。 Ncache 提供的示例应用程序是在 Visual Studio 2008 中制作的,我在转换它们后在 Visual Studio 2010 中运行它们。 Ncache 附带的 Oracle.DataAccess.dll 版本为 2.112.1.0,NCache 附带的 Oracle.DataAccess.dll 版本为 2.121.1.0。我被困在这几天了。

【问题讨论】:

    标签: c# visual-studio-2010 oracle dll ncache


    【解决方案1】:

    这个问题的解决方案非常简单。 Ncache.web 内部使用 Web dll。我删除了 Ncache 附带的引用,并且必须从 'assembly\GAC_64' 添加 Oracle.DataAccess.dll 的引用,因为我使用的是 .Net 4.0,它从 'C:\Windows\ 引用 2.0 dll程序集',以防我不添加 Ncache 附带的引用。

    【讨论】:

      猜你喜欢
      • 2013-03-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-17
      • 2010-12-11
      • 2017-09-22
      • 2013-02-27
      • 2014-07-04
      相关资源
      最近更新 更多