I get BadImageFormatException when running a unit test in VS2013. The error occurs in a call to Assembly.LoadFrom.
Configuration is set to Debug x64. In this configuration all assemblies are set to built AnyCPU or x64.
TEST | Test Settings | Default Processor Architecture is set to X64.
Wrote a little utility to run CorFlags on each assembly in the test directory. Every assembly is either PE32 (AnyCPU) or PE32+ (x64 only) and no assembly has 32BITREQ or 32BITPREF.
Any idea where this error is coming from?