Error Message: “An unhandled exception of type ‘System.BadImageFormatException'”

Error Message: An unhandled exception of type ‘System.BadImageFormatException’ occurred in mscorlib.dll  Additional information: Could not load file or assembly ‘Imatest.IT, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

Solution: This is caused by trying to run a 64-bit Imatest IT installation using a an x86 configuration in Visual Studio. Be sure the configuration is set correctly for the version of Imatest you have installed.  Note, because Matlab DLLs are compiled for a specific architecture, the “Any CPU” option may not work properly. It is best to use the configuration specific to your Imatest version (“x64” for 64-bit and “x86” for 32-bit).

Note: As of Imatest 4.5, only 64-bit architectures are supported.