Say I have 2 Winform A, B projects.
Project A (target .NET 2.0) must be running on x86 (this is an external library), and for old reasons, Project B (target .NET 4.0) must be running on any processor. Now I need to call the methods from project B, but it throws an error:
"An unhandled exception of type 'System.BadImageFormatException' occurred in System.Windows.Forms.dll" Additional information: Could not load file or assembly 'CSharpDemo, Version=1.0.5414.18636, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format."
However, I found that if I target Project B on .NET 4.5, this problem does not occur. But I still want Project B to be guided by 4.0, how to achieve this?
source share