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

17

我的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()

代码没有变化,所以我认为不是代码问题(这里是出问题的代码行)。

我下载的新版本有问题吗?我在http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki的“Precompiled Statically-Linked Binaries for 32-bit Windows (.NET Framework 4.0)”段落中下载了sqlite-netFx40-static-binary-Win32-2010-1.0.84.0.zip

编辑:我回退到以前的DLL,但问题仍然存在,可能是因为Visual C#某处有一些未被清理的缓存。

3个回答

12

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


而且你没有安装两个版本——这是我的问题所在。 - Ola M

1
我想你应该从Nuget Package Manager更新Sqlite库。这对我有用。

0
你有源代码控制吗?这样你就可以将文件回滚到工作状态。
清理并构建你的解决方案,然后将SQLite.Interop.DLL设置为复制到新版本,并确保它位于你的bin文件夹中。
祝好。

是的,源代码、VS项目和DLL文件都在Git上。当我在“EDIT”段落中写“我恢复到之前的DLL”时,这意味着使用Git进行还原。因此,我确信它与之前的DLL相同。 - Nicolas Raoul

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接