Troubleshooting BadImageFormatException

Verified build settings such as Platform Target are all the same (x86).

That’s not what the crash log says:

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64

Note the 64 in the name, that’s the home of the 64-bit version of the framework. Set the Target platform setting on your EXE project, not your class library project. The XxxDevicesService EXE project determines the bitness of the process.

Leave a Comment