I just checked out a revision from Subversion to a new folder. Opened the solution and I get this when run:
Could not load file or assembly \'xxxx\' or one
Sounds like one part of the project is being built for x86-only while the rest is being built for any CPU/x64. This bit me, too. Are you running an x64 (or uh... IA64)?
Check the project properties and make sure everything is being built for "Any CPU". f you're in Visual Studio, you can check for everything by going to the "x86" or "Any CPU" menu (next to the "Debug"/"Release" menu) on the toolbar at the top of the screen and clicking "Configuration Manager..."
I had this error when trying to use the dreadful Business Objects 4 for .Net SDK.
They ship five BusinessObjects*.dll files, but all of them are 64-bit.
To get my webpage to load, I needed to click on Tools\Options, then change this setting in VS2013:
The BadImageFormatException on an application running on IIS (not running from VS, since visual studio fixes the problem by using the build for "Any CPU") can be caused by the following:
The site is one a server that is x64 and the Application Pool's default setting for Enable 32-Bit Applications was False. and you have 32-bit assemblies
On the level of Visual Studio, the fix is: