An unhandled exception of type ‘System.BadImageFormatException’ occurred. After changing the target to x86, it is OK. I am wondering does it mean the library is 32 bit only. How to make it work with 64 bit too?
An unhandled exception of type ‘System.BadImageFormatException’ occurred. After changing the target to x86, it
Share
The library probably target to x86. Do you have source or it 3rd party? You need to recompile it to AnyCPU if it possible. You can try to use CorFlags to change it to AnyCPU but it will works only if library not specifically intended to use in x86 only.
I put a bit info some time ago, maybe it will be helful: Moving from 32-bit applications to 64-bit applications