Reference platform specific System.Data.SQLite
Posted
by Dmitriy Nagirnyak
on Stack Overflow
See other posts from Stack Overflow
or by Dmitriy Nagirnyak
Published on 2010-04-29T00:27:47Z
Indexed on
2010/04/29
0:47 UTC
Read the original article
Hit count: 296
I am using SQLite for the unit testing and might use it as a database for local development/staging.
The System.Data.SQLite has basically 2 versions: x86 and x64. Correct one should be used for the specific platform.
I have 64 bit Win7, other guys in the team might use 32-bit OSs. The server's platform is not known at this stage.
If I use 32-bit version of the assembly on 64-bit platform I get BadImageFormatException: Could not load file or assembly 'System.Data.SQLite'
. I believe similar will happen trying to use 64-bit assembly on 32-bit platform.
So my question is what is the best way to reference the SQLite assembly so that it does not depend on the platform and people can just use it?
It is ok to use 32-bit version of assembly on a 64-bit platform (Maybe there is a switch for that somewhere?).
© Stack Overflow or respective owner