BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)

Question: How do you solve the error that says "BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)" in Asp.Net 5 Application?

Answer: This tells you that you are trying to use a 32bit application with a 64bit DLL based. If your application is running in a 32 bit mode, always make sure that all your DLL loaded in the Reference Section in Visual Studio are of version 32bit. If you attempt to consume a 64bit DLL or any libraries made for a 64bit Hosting, this error is thrown.

I hope this helps you, leave a comment if this does help you solve your problems.


Edit this Article
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2022 - ErnesTech - Privacy