IBM DB2 issue--System.BadImageFormatException: Could not load file or assembly IBM.DB2.DLL or one of its dependencies(IBM DB2 问题--System.BadImageFormatException:无法加载文件或程序集 IBM.DB2.DLL 或其依赖项之一)
问题描述
我收到上述错误消息.我已经进行了足够的研究并尝试了各种选择,但仍然没有运气.
I am getting the above mentioned error message. I have made enough research and tried out various options but still no luck.
以下是详细信息:
OS: Windows 7 64 bit version
Visual studio version: 2013 Premium
.NET framework version is : 4.0.30319
ASP.NET version: 4.0.30319.34249
IIS version: 7.0
DB2 installed path: C:Program Files (x86)IBM
DLL path: C:Program Files (x86)IBMSQLLIBBIN
etf40IBM.DB2.dll
DLL Version: 9.7.4.4
我还将我的解决方案配置管理器平台更改为任何 CPU,并且我通过将属性 enable 32-bit application 设置为 True 更改了应用程序池中的设置>.
I have also changed my solution configuration manager platform to Any CPU and also I have changed the settings in the application pool by setting the property enable 32-bit application to True.
但仍然遇到同样的错误.还有其他解决方法吗?
But still am getting the same error. Is there any other workaround?
请帮助我提出您的建议.
Please help me with your suggestions.
推荐答案
这几天遇到这个问题,按照这个 IBM 文档说,就是去项目中的引用,将 DB2 dll 的复制本地"设置为 false,直接引用来自DB2 客户端设置
This problem happened me these days and it was solved following what this IBM document says, that is to go to the reference in the project and set "Copy local" to false for DB2 dlls, referencing diretly the ones from the DB2 client setup
这篇关于IBM DB2 问题--System.BadImageFormatException:无法加载文件或程序集 IBM.DB2.DLL 或其依赖项之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:IBM DB2 问题--System.BadImageFormatException:无法加载文件或程序集 IBM.DB2.DLL 或其依赖项之一


基础教程推荐
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01