Home > Database > Mysql Tutorial > body text

尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果

WBOY
Release: 2016-06-07 15:27:28
Original
2213 people have browsed it

项目调试过程中出现:尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行 当一个运行在64位平台上的.NET应用程序试图调用一个不支持64位执行的DLL时,这个异常就会发生。假如应用程序在

项目调试过程中出现:尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行

当一个运行在64位平台上的.NET应用程序试图调用一个不支持64位执行的DLL时,这个异常就会发生。假如应用程序在未指定平台(例如“Any CPU”)模式下生成,它将运行在基于操作系统的64位模式下,会导致这个问题。想解决这个问题,你可以通过指定为X86解决方案平台编译,使应用程序运行在32位模式;或者使程序运行在基于64位操作系统的WOW64子系统,并许可使用32位DLL。

 

1.修改项目生成目标平台为x86,如下图所示


尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果


2.修改debug 目标平台为x86



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!