user1312412
user1312412

Reputation: 203

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." Bag image foramt exception was unhandled

Upvotes: 0

Views: 4182

Answers (3)

Chiwda
Chiwda

Reputation: 1344

This happens when you try to load a 32 bit dll in a 63 bit process or vice versa as munissor said. You can use PESnoop to determine whether an image is 32 or 64 bit.

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

Upvotes: 0

munissor
munissor

Reputation: 3785

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

Upvotes: 2

Shailesh
Shailesh

Reputation: 1218

Are you developing your program on a 64 bit machine? If yes, just allow your application to accept 32 bit assembly as well.

If it is a web program hosted on IIS, you can allow 32 bit assembly from Application pool. 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.

Upvotes: 0

Related Questions