System.Data.SQLite
View Ticket
Not logged in
Ticket UUID: 6bbbeb1da56f56f3e6cd397717e74be0243b6105
Title: Unable to find an entry point named 'sqlite3_changes_interop' in DLL 'SQLite.Interop.dll'
Status: Closed Type: Incident
Severity: Important Priority: Medium
Subsystem: Integration_Via_PInvoke Resolution: Not_A_Bug
Last Modified: 2013-12-03 19:56:01
Version Found In: 1.0.89.0
User Comments:
anonymous added on 2013-12-02 14:16:51:
The error message occurs during TeamCity NUnit Build Runner, not within Visual Studio nor external build runner.

The build runner is running under Framework 4.0 x86 on x64 Windows Server 2008 R2.
The Visual Studio C# project is set to Framework 4.0 x86 Release configuration
By copying the SQLite.Interop.dll into output folder, the error is solved.

Usually it is installed like this:

Project
.x86
..SQLite.Interop.dll
.x64
..SQLite.Interop.dll

By changing SQLite.nuspec to

Project
.x64
..SQLite.Interop.dll
.SQLite.Interop.dll

the problem is solved.

anonymous added on 2013-12-02 14:20:43:
The error message occurs during TeamCity NUnit Build Runner, not within Visual Studio nor external build runner.

The build runner is running under Framework 4.0 x86 on x64 Windows Server 2008 R2.
The Visual Studio C# project is set to Framework 4.0 x86 Release configuration
By copying the SQLite.Interop.dll into output folder, the error is solved.

Usually it is installed like this:

Project
.x86
..SQLite.Interop.dll
.x64
..SQLite.Interop.dll

By changing SQLite.nuspec to

Project
.x64
..SQLite.Interop.dll
.SQLite.Interop.dll

the problem is solved.

This error occured after updating from version 1.0.82.0.
All assemblies in output folder are version 1.0.89.0.

mistachkin added on 2013-12-02 22:20:43:
This may be related:

[http://stackoverflow.com/questions/14396656/after-sqlite-update-unable-to-find-an-entry-point-named-sqlite3-changes-intero]

Do you have a stack trace when this issue is being observed?

Can you provide the environment variable value for PROCESSOR_ARCHITECTURE
for the actual process using System.Data.SQLite?

I suspect that TeamCity NUnit Build Runner may be impacting the PATH and/or
PROCESSOR_ARCHITECTURE environment variables in such a way to prevent the
native interop assembly from being loaded correctly.

mistachkin added on 2013-12-02 22:26:41:
Alternatively, TeamCity NUnit Build Runner may be using and/or caching an old
version of the System.Data.SQLite interop assembly that lacks this entry point
(i.e. it is new as of the 1.0.83.0 release).

anonymous added on 2013-12-03 08:30:32:
I found the reason for this error. In my UnitTest project I have loaded severall test assemblies. A few of them are using System.Data.SQLite assembly.
It seems that not all of them were updated correctly to 1.0.89.0. So at least one of them is loading 1.0.82.0 into AppDomain and others the newer version.

When running the same configuration with failing tests only, they succeed.
A quick workaround is to check the "Run one process per assembly" in TeamCity configuration.
The solution would be to update all usages of SQLite to same version.

Sorry for bothering you.