Cheetah wrote:
>
> I went to try and file this as a ticket, but it appears that
> feature has been disabled for the "anonymous" login method.
>
Reporting issues on this mailing list is fine.
>
> Anyways, the new release's processor detection and native
> library pre-loading has a nearly show-stopper bug for me.
>
The native library pre-loading code is designed to fail without
causing any issues in the containing process. The actual attempt
to load the native library is wrapped in a try/catch block.
>
> Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE"),
> which is supposed to reveal the architecture for the process,
> but it does not work 100% correctly.
>
I've seen no evidence of this problem. This issue has nothing to
do with the environment variable value, which is actually correct.
When pure managed code is compiled by Visual Studio, it should run
natively on the processor architecture of the machine (e.g. x64 in
your case).
In order to run (as opposed to just build) the System.Data.SQLite
projects on a 64-bit machine, selecting the "DebugNativeOnly" (or
"ReleaseNativeOnly") build configuration and the "x64" build
platform are both required because this will enable the necessary
post-build step(s) to copy the interop assembly to the managed
assembly output directory (where it can be located by either the
native library pre-loading code or the OS loader).
A similar setup (complete with post-build steps) will be required
if you wish to import the System.Data.SQLite projects into another
solution.
>
> The upshot is that starting any of my 32 bit applications from
> VS2010 on 64 bit windows, it tries to load the wrong DLL and
> thus throws an exception and dies.
>
Just to clarify, the native library pre-loading code itself does
not throw any exceptions itself. Most likely, the exception you
are seeing is a direct result of the OS loader being unable to
locate the native interop assembly because it is not being copied
by the post-build step.
--
Joe Mistachkin
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users