
And if you’re building your solution in 圆4, running it in 32-bit IIS Express won’t work. Why do I think that’s the case? Well, see – by default, Visual Studio uses a 32-bit version of IIS Express (Internet Information Services Express – the free lightweight web server that ships with some Windows versions and are useful for local development with Visual Studio) for your deployments. The format, in this case, refers most likely to the 64-bit build of an application being deployed to IIS, which is being run in 32-bits. “An attempt was made to load a program with an incorrect format.” That means that the assembly, which was to be loaded, was in an unexpected format.

The latter part of the error message should point you in the right direction. In quite a few cases, it’s simply a mismatch between architectures and easily changed. No fear, though, as this is usually easily fixed. An attempt was made to load a program with an incorrect format.

Solution: Change the IIS Express to run in 64bĮspecially while installing a new dev machine, and building your project for the first time, you may end up getting the following exception:Ĭould not load file or assembly ‘’ or one of its dependencies.
