visual studio - System.BadImageFormatException: How to fix .NET version mismatch? -
In 2005 VS 2005 wrote a DLL which will be loaded by another program developed in VS 2003. When that program is tried, load my DLL, it throws a
system. BADImageFormatException: The format of the 'Foo.dll' file is invalid . I searched for SO and Google, and it seems that this is different version of the NAT is the culprit. My question is how do I fix it?
(I can not modify the program developed in VS 2003.)
Compile the VS2005 project with the same. Or, depending on the size of your VS2003 project, reflector and rewrite it. This is a common practice for projects here, where there is no other VSS version available for some vague reasons.