2012/5/23 Joe Mistachkin <sql...@mistachkin.com>

>
> Damien wrote:
> >
> > Is there a way to have an assembly targeting "any cpu", that chooses by
> > itself the right dll to use at runtime ?
> >
>
> The System.Data.SQLite managed-only assembly, when the native library
> pre-loading code is enabled (which it is by default starting with
> release 1.0.80.0), will now attempt to detect the processor architecture
> of the process it is being loaded into and then it will attempt to load
> the native interop library from an appropriately named subdirectory (e.g.
> "x86", "x64", etc). In order to take advantage of this feature, the
> System.Data.SQLite managed-only assembly should be deployed with the
> other managed binaries in your application and the native interop
> libraries should be deployed in platform-specific sub-directories
> underneath that directory, as follows:
>
>        <appDir>\YourApp.exe
>        <appDir>\System.Data.SQLite.dll (managed-only assembly)
>        <appDir>\x86\SQLite.Interop.dll (x86 native-only interop library)
>        <appDir>\x64\SQLite.Interop.dll (x64 native-only interop library)
>
> If this feature does not work properly in your environment, it can be
> disabled by setting the "No_PreLoadSQLite" environment variable prior to
> loading and/or using the System.Data.SQLite assembly.
>
>
Tested and working.

Thanks :)

Damien
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to