.net - Reference platform specific System.Data.SQLite -


i using sqlite unit testing , might use database local development/staging.

the system.data.sqlite has 2 versions: x86 , x64. correct 1 should used specific platform.

i have 64 bit win7, other guys in team might use 32-bit oss. server's platform not known @ stage.

if use 32-bit version of assembly on 64-bit platform badimageformatexception: not load file or assembly 'system.data.sqlite'. believe similar happen trying use 64-bit assembly on 32-bit platform.

so question best way reference sqlite assembly not depend on platform , people can use it?

it ok use 32-bit version of assembly on 64-bit platform (maybe there switch somewhere?).

if it's installed gac, reference assembly , system pick correct one.

otherwise, need make sure reference correct 1 "manually" (i have, in past, used build system copied correct version "deploy" folder when building. these days, 64-bit it's not such big deal).

alternatively, can build application x86 , use 32-bit version exclusively. in project properties, on build tab, set "platform target" "x86". need executables: dlls can still anycpu.


Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -