Posted by Phil in .NET
on Aug 14th, 2009 | 0 comments
Having recently started developing in Vista 64bit, this is an exception that I’ve bumped my head against a couple of times.
System.BadImageFormatException
“An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)”
If you’re in a 64bit environment, your solution is targeting “Any CPU” and you try to link to a 32bit library you’ll get this exception at runtime. Note that this doesn’t apply to just .NET libraries, if you’re linking to a native library you’ll get this exception...