I created a C++/CLI assembly that creates a wrapper around native C++ code. The resource compiles and the assembly loads fine into my C# project when I add it as a resource. I can access my objects and intellisense from within my application, but when attempting to build, it crashes with the exception:
BadImageFormat
Could not load file or assembly 'MyCLI, Version=1.0.3680.28432, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
I load it into my form load event:
MyCLI.myCLI z;
... and when I compile, it crashes on this line in my main constructor in C#
Application.Run(new Form1());
Does anyone have an idea of what could be causing this exception?
Thanks