I have an assembly which I guess is built in x64 and I want to reference that in a project with Any CPU configuration. But When I reference that .net assembly to the prject with Any CPU platform, I get the following warning
warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Users\QvAdmin\Documents\Visual Studio 2013\Projects\QvAccessPointT2\x64\Debug\CppT1.exe", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
So I am trying to use a c++ mixed mode assembly as described here. I created a CLR console app(C++).
But again I get the same exception I was fighting against so long. In the solution shown CSharpT1 is the startup project which references CppT1, a CLR Cpp Console app project. What I expected after reading this is that I would be able to reference CppT1 with bout any problem becuase its a Cpp project and a configuration is set to x64. But the problem remained. My idea is throw Cpp project I would be able to load the x64 assembly. This is one more reference.
Message: An unhandled exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
Additional information: Could not load file or assembly 'CppT1, Version=1.0.5578.39432, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.