SQLite 程序集应该在您的路径中,或者在您的应用程序目录中,而不是在您的模块目录中。如果是这种情况,并且您仍然遇到相同的错误,那么这听起来与我在此处发布的完全相同的问题,使用以下解决方案:
public static class AssemblyResolverFix
{
//Looks up the assembly in the set of currently loaded assemblies,
//and returns it if the name matches. Else returns null.
public static Assembly HandleAssemblyResolve( object sender, ResolveEventArgs args )
{
foreach( var ass in AppDomain.CurrentDomain.GetAssemblies() )
if( ass.FullName == args.Name )
return ass;
return null;
}
}
//in main
AppDomain.CurrentDomain.AssemblyResolve += AssemblyResolverFix.HandleAssemblyResolve;