Saturday, December 15, 2012

System.BadImageFormatException

I got following error when running Test project with visual studio 2010.

SetUp : System.BadImageFormatException : Could not load file or assembly 'TP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Solution:

When I checked there were difference in Solution platforms of two project.One set to x86 while other project set to AnyCPU.So I changed it from AnyCPU to x86.It works.