无法加载文件或程序集

发布于 2024-11-29 19:07:22 字数 596 浏览 6 评论 0原文

我有一个使用 Oracle.DataAccess.dll 的 ASP.NET 网站。我的本地计算机的 GAC 中有版本 10.2.0.100 和 1.111.6.0,但开发服务器上只有 10.2.0.100。当我将网站部署到服务器并运行网站时,在网站加载之前我收到此错误:

"Could not load file or assembly 'Oracle.DataAccess, Version=1.111.6.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

我想我需要针对 10.2.0.100 版本构建我的应用程序,但我不知道如何做到这一点。如果我从本地计算机上的 GAC 中删除 1.111.6.0 版本并尝试重建,则会收到上述错误。

我该如何解决这个问题?即使 GAC 中存在该 dll 的多个版本,如何针对某一 dll 进行构建?

I have an ASP.NET website that uses the Oracle.DataAccess.dll. I have version 10.2.0.100 and 1.111.6.0 in the GAC of my local machine, but only 10.2.0.100 on the dev server. When I deploy the website to the server and run the website, I get this error before the website even loads:

"Could not load file or assembly 'Oracle.DataAccess, Version=1.111.6.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

I guess I need to build my app against the 10.2.0.100 version but I don't see how to do that. If I remove the 1.111.6.0 version from the GAC on my LOCAL machine and try to rebuild, I get the error above.

How do I resolve this issue? How do I build against a certain dll even if there are more than one version of that dll in the GAC?

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

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

发布评论

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

评论(4

深海不蓝 2024-12-06 19:07:23

您可以指定要使用的版本。鲍比找到了我正在寻找的链接,很好的链接。

You can specify a version to use. Bobby found the link I was looking for, nice one.

愿与i 2024-12-06 19:07:22

如果您的服务器是 64 位计算机,请在 IIS 中启用 32 位应用程序的执行。

应用程序池>>高级设置>>启用 32 位应用程序。

If your server is a 64bit machine, enable execution of 32 bit applications in IIS.

Application pools >> Advanced Settings >> Enable 32bit Applications.

把回忆走一遍 2024-12-06 19:07:22

嗯,当您从“添加引用”对话框中选择引用时,您可以选择您想要的版本...

在此处输入图像描述

Mmm, when you select the reference from the Add Reference dialog you can chose witch version do you want ...

enter image description here

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