When I am providing 64bit C++ dll as a reference to a C# project which will generate AnyCPU C# dll. I am able to generate the C# dll but when I launch application An error comes saying,
Type : System.BadImageFormatException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxx Message : Could not load file or assembly 'MyDLLName, 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.
As the C# dll is unable to fetch the C++ dll. So, how can I resolve this error?