-1

I am trying to build a solution for x86 and x64 configurations in VS2013 but I have this issue of BadImageFormatException with one of the dlls. This is a Winforms application that is 99.999% managed but depends on one dll that is written in C. I am using DllImport to simply access different functions within the dll. This dll is the culprit since it comes back with BadImageFormatException when I build the project with x64. It works fine when I build everything with x86.

I am using a VS Setup Project targeting either x86 or x64 depending on the build configuration. Any help would be much appreciated.

Dimitris
  • 2,030
  • 3
  • 27
  • 45

1 Answers1

1

Because you have a DLL dependency which is x86, you will not be able to target x64 in your solution.

Stuart Grassie
  • 3,043
  • 1
  • 27
  • 36