I am using an external dll in my project. When i try to run the application on a 64bit machine, it crashes with a FileLoadException
. Since it works fine on a 32bit system, i suspect the dll to be 32bit. However, setting the project's target platform to x68 doesn't help.
I read 32bit dll in 64bit application in c# and Load 32bit DLL library in 64bit application and some other pages that tell i should build the whole app as a 32bit process (which wouldn't bother me - it should just be executable on a 64bit windows), but i don't know how to build a 32bit app on a 64bit dev machine if not by setting the target platform...
The code is just
static void Main(string[] args)
{
var mf = new QuickFix43.MessageFactory();
Console.WriteLine("running");
Console.ReadKey();
}
and the QuickFix stuff is from the dll.
Edit: I checked the dll with CorFlags and figured
CLR Header: 2.5
PE : PE32
CorFlags : 16
which means that the dll is a Mixed-mode assembly that can be loaded only in an i386 environment ( http://blogs.msdn.com/b/slessard/archive/2010/04/09/types-of-managed-code-assemblies.aspx )
Is is it possible to load this in an 64bit environment?