I run Windows7 x64 operating system and referencing some of the projects resulted in “BadImageFormatException: could not load file or assembly” error during the run-time.
Microsoft has a knowledge base article explaining that the most likely cause for this error is platform incompatibility.
This behavior will also occur if your application is compiled targeting the "AnyCPU" platform, and then is run an operating system whose platform differs than the assembly whose type you are trying to instantiate. For example, if the main application is compiled to "AnyCPU", and references an assembly that targets x86, then if you run the application on an x64 operating system, the BadImageFormatException will occur.
Although none of the my referenced projects were compiled explicitly as ‘x86’ or ‘x64’ (all were ‘any CPU’), I decided to specify the target platform explicitly as ‘x86’ and it worked. In order to change the target platform, you should go to your project properties inside the Visual Studio and edit ‘Build’ tab:
Hope the screenshots help.