Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

BadImageFormatException when all assemblies are AnyCPU (PE32) or 64-bit (PE32+)

$
0
0

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?


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>