错误的图像格式异常 [英] Bad Image Format Exception
本文介绍了错误的图像格式异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Visual Studio 2010
DotNet框架:v3.5
操作系统:Win7
程序编译成功但运行中有例外。
图像格式异常
无法加载文件或程序集Interop.SQLDMO,Version = 8.5.0.0,Culture = neutral,PublicKeyToken = null或其依赖项之一。试图加载格式不正确的程序。
任何人请帮忙。如何解决它。
Visual Studio 2010
DotNet framework: v3.5
Operating system: Win7
Program compiled successfully but exception on run.
Bad Image Format Exception
Could not load file or assembly 'Interop.SQLDMO, Version=8.5.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Any one please help. how to resolve it.
推荐答案
很难说明这一点,但你很可能正在运行64位应用程序并尝试加载32位库。 br />
尝试将项目设置更改为x86而不是x64,然后重试。
Difficult to tell from just that, but it is quite likely that you are running a 64bit application and trying to load a 32bit library.
Try changing your project settings to "x86" instead of "x64" and try again.
我认为它与架构相关的问题。
您使用的架构:32位(x86)或64位( x64)
如果您使用,请尝试使用相同版本的dll,客户端也应该使用相同版本的架构。
谢谢
Suvabrata
Hi,
I think its a architecture related problem.
Which architecture you use :32 bit (x86) or 64 bit (x64)
which ever you use please try the same version of dll and client should also use the same version of architecture.
Thanks
Suvabrata
这篇关于错误的图像格式异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文