I’m writing a windows app using x64 windows. On the dev machine I can export the installer, install the application and it works just fine, no matter whether I compile for Any CPU, x86 or x64 and seemingly no matter what version of System.Data.SQLite.dll I’m using – mixed mode, x64, x86, not mixed-mode…
When transferring the installer to another machine, also x64 Win7, no matter how the application is compiled and no matter what System.Data.SQLite.dll I use.
I get errors ranging from BadImageFormatException to UnsafeNativeMethods depending on which combination I’m using.
Which combination of System.Data.SQLite.dll and CPU compilation should I be using? x64 / x64 seems the logical choice, but surely forcing an x86 compile and using the x86 dll should work too?
Or am I barking totally up the wrong tree?
Thanks
Edit: It’s only really important that the app compile on x64 w7 at least for now.
I had the same issue. I had to ensure I used the 32-bit version and compiled it as an x86 application (even for Windows 7 x64 systems).
If it helps, the size of the
system.data.sqlite.dllfile was 866 KB (using version 1.0.64 if I remember correctly).