SQLite更新后:无法在DLL“SQLite.Interop.dll”中找到名为“sqlite3_changes_interop”的入口点

时间:2013-01-18 10:14:21

标签: c# sqlite dll dllimport system.data.sqlite

我的C#/ SQLite工作正常,直到我决定更新SQLite DLL(从1.0.82.0到1.0.84.0)。现在我遇到了这个崩溃:

  

无法在DLL“SQLite.Interop.dll”中找到名为“sqlite3_changes_interop”的入口点

A first chance exception of type 'System.EntryPointNotFoundException' occurred in System.Data.SQLite.dll
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>SparkleShare.vshost.exe</AppDomain><Exception><ExceptionType>System.EntryPointNotFoundException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Unable to find an entry point named 'sqlite3_changes_interop' in DLL 'SQLite.Interop.dll'.</Message><StackTrace>   at System.Data.SQLite.UnsafeNativeMethods.sqlite3_changes_interop(IntPtr db)
   at System.Data.SQLite.SQLite3.get_Changes()
   at System.Data.SQLite.SQLiteStatement.TryGetChanges(Int32&amp;amp; changes)
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()

代码没有改变,所以我认为这不是代码问题(here is the line无论如何都会发生。)

我下载的新版本有问题吗?我在http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki

sqlite-netFx40-static-binary-Win32-2010-1.0.84.0.zip段下载了Precompiled Statically-Linked Binaries for 32-bit Windows (.NET Framework 4.0) 编辑:我恢复了以前的DLL,但问题仍然存在,可能是因为Visual C#在某处无法清理某些缓存。

3 个答案:

答案 0 :(得分:11)

确保项目的x64和x86文件夹中的SQLite.Interop.dll已更新为1.0.84.0版。

答案 1 :(得分:0)

你有源代码管理吗?因此,您可以回滚文件的工作状态。

清理并构建解决方案,然后将SQLite.Interop.DLL设置为较新的副本。并确保它位于您的bin文件中。

问候

答案 2 :(得分:0)

我请客人从Nuget Package Manager更新Sqlite库。它对我有用。