Troubleshooting Exceptions: System.BadImageFormatException
Aexception is thrown when the file image of a DLL or executable program is not valid.
- Make sure the file image is a valid managed assembly or module.
This exception is thrown when unmanaged code is passed tofor loading.
For more information, Visual Basic users can see(Visual Basic).
- Make sure you have supplied a correct file path for the assembly.
If using a relative path, verify that the current directory is correct.