Know Issue Report: Problems using NHibernate + SQLite with .NET 4

开发环境:

VS2010,

.NET 4.0,

NHibernate 3.2.0.4000,  runtime: v2.0.50727

System.Data.SQLite Version: 1.0.66.0  RunTime:  v2.0.50727

会抛出: Could not load type System.Data.SQLite.SQLiteCommand, System.Data.SQLite and Could not load type System.Data.SQLite.SQLiteConnection, System.Data.SQLite exception, 但并不影响程序的执行.

image

image

相关讨论帖子:

http://stackoverflow.com/questions/2697795/problems-using-fluentnhibernate-sqlite-with-net4

http://sqlite.phxsoftware.com/forums/t/2322.aspx

大致的说法是:

System.Data  中的 IDbConnection and IDbCommand 发生了问题, 因为System.Data.SQLite用的是2.0的.net runtime, 而程序里面包含的是 4.0的runtime.

从理论上讲, 我们需要.net 4.0 runtime 的System.Data.SQLite.

但是疑惑的是: NHibernate  3.2 也是2.0 runtime, 但是它却是OK的.

原文地址: http://flyear.net/Artical/Problems-Using-NHibernate-SQLite-With-DotNet-4-Runtime

原文地址:https://www.cnblogs.com/feinian/p/2190180.html