Thursday, 9 June 2011

Could not load file or assembly 'XXXXX' or one of its dependencies. An attempt was made to load a program with an incorrect format.

This started happening all of a sudden when I tried to build or rebuild my VS2010 solution. This was because some of the projects in the solution target different platforms (mixed platforms).

I fixed this by going to the Configuration Manager... which is in the drop-down of your configurations (Debug, Release etc.) in VS2010. Then I set "Active solution platform" drop-down to "Any CPU".

I rebuilt the solution and it succeed in compiling.

No comments: