简体   繁体   English

无法加载文件或程序集

[英]could not load file or assembly

i am getting the following when i tried to load a pdf file "Could not load file or assembly 'Interop.Acrobat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format."当我尝试加载 pdf 文件“无法加载文件或程序集‘Interop.Acrobat,Version=1.1.0.0,Culture=neutral,PublicKeyToken=null’或其依赖项之一时,我得到以下信息。尝试了加载格式不正确的程序。” Bag image foramt exception was unhandled包图像格式异常未处理

The most common scenario when yoiu get bad image format errors when you try to load a 64 bit image into a 32 bit process当您尝试将 64 位图像加载到 32 位进程时,yoiu 出现错误图像格式错误的最常见情况

Are you developing your program on a 64 bit machine?您是在 64 位机器上开发程序吗? If yes, just allow your application to accept 32 bit assembly as well.如果是,则只允许您的应用程序也接受 32 位汇编。

If it is a web program hosted on IIS, you can allow 32 bit assembly from Application pool.如果它是托管在 IIS 上的 web 程序,您可以允许来自应用程序池的 32 位程序集。 If it is a console application you can change at assembly level.如果它是控制台应用程序,您可以在程序集级别进行更改。

It is very common error and practically will be fixed with above steps.这是非常常见的错误,实际上可以通过上述步骤修复。

Hope it will help you to solve your problem.希望它能帮助您解决问题。

This happens when you try to load a 32 bit dll in a 63 bit process or vice versa as munissor said.当您尝试在 63 位进程中加载 32 位 dll 时会发生这种情况,反之亦然,如 munissor 所说。 You can use PESnoop to determine whether an image is 32 or 64 bit.您可以使用 PESnoop 确定图像是 32 位还是 64 位。

Get it from http://www.prestosoft.com/download/plugins/PESnoop.ziphttp://www.prestosoft.com/download/plugins/PESnoop.zip获取

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM