BadImageFormatException
, in my experience, is almost always to do with x86 versus x64 compiled assemblies. It sounds like your C++ assembly is compiled for x86 and you are running on an x64 process. Is that correct?
Instead of using AnyCPU/Mixed
as the platform. Try to manually set it to x86
and see if it will run after that.
Hope this helps.