【发布时间】:2011-05-12 00:16:18
【问题描述】:
这是引发异常的代码
public Configuration GetConfiguration()
{
var persister = SQLiteConfiguration
.Standard
.UsingFile("Test.db")
.ShowSql();
var configuration = Fluently
.Configure()
.Database(persister)
.Mappings(map => map.FluentMappings.AddFromAssemblyOf<WordMap>())
.BuildConfiguration();
new SchemaExport(configuration).Execute(true, true, false);
return configuration;
}
完整的异常文本:
失败:NHibernate.HibernateException:无法创建驱动程序 来自 NHibernate.Driver.SQLite20Driver,NHibernate,版本=2.1.2.4000, 文化=中性,PublicKeyToken=aa95f207798dfdb4。
----> System.Reflection.TargetInvocationException : 调用目标抛出异常。
----> NHibernate.HibernateException : 程序集 System.Data.SQLite 中的 IDbCommand 和 IDbConnection 实现可以 找不到。确保程序集 System.Data.SQLite 位于 在应用程序目录或全局程序集缓存中。如果 程序集在 GAC 中,使用元素 应用程序配置文件指定的全名 组装。
NHibernate 的版本是 2.1.2.4000
System.Data.SQLite 的版本是 1.0.66.0
目标框架是 3.5 (x86)
System.Data.SQLite 的本地副本已打开。
可能出了什么问题?
【问题讨论】:
标签: c# nhibernate sqlite