BadImageFormatException When Running 32/64 Bit Applications in Visual Studio

PR Code - Christopher Pateman
1 min readMar 25, 2020

You might be about to run your application and suddenly you are getting ‘System.BadImageFormatException’. This is what I got when running a new application that I didn’t build. It took me a little bit to figure out what the issue was, but as below, the culprit was found and also some other interesting configurations required.

The problem I found was the application was built using a DotNet Core Console Application, but specifically using the x64 Bit processor. Now this is not a problem of course, as you want it to use the best performance processor the application can, so you can deliver that performance to your end users. However, it seems the rest of Visual Studio was not ready for this, so running Local IIS or running Unit Tests was causing a System.BadImageFormatException exception.

Continue Reading Full Story at http://prcode.co.uk on March 25, 2020.

--

--

PR Code - Christopher Pateman

I’m a Azure DevOps Engineer with a wide knowledge of the digital landscape. I enjoy sharing hard to find fixes and solutions for the wider community to use.