【发布时间】:2009-05-10 15:05:40
【问题描述】:
我无法让 SQLite 驱动程序在我的 sessionfactory 中工作。
我从http://sqlite.phxsoftware.com/下载了SQLite 1.0.48
我在我的测试项目中添加了对 System.Data.SQLite 的引用。
public static IPersistenceConfigurer GetSqlLiteConfigurer()
{
try
{
return SQLiteConfiguration
.Standard
.InMemory();
}
catch (Exception ex)
{
throw ex;
}
}
这就是我生成配置器的方式
问题是当我构建我的 sessionfactory 时出现以下错误:
NHibernate.HibernateException: The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found. Ensure that the assembly System.Data.SQLite is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use <qualifyAssembly/> element in the application configuration file to specify the full name of the assembly.
at NHibernate.Driver.ReflectionBasedDriver..ctor(String driverAssemblyName, String connectionTypeName, String commandTypeName)
at NHibernate.Driver.SQLite20Driver..ctor()
我已尝试更改 SQLite 版本,但没有解决问题。
我找不到问题所在,我已经为此工作了 2 天。
如果您需要更多信息,请告诉我。
感谢您的帮助!
查尔斯
【问题讨论】:
标签: unit-testing nhibernate sqlite fluent-nhibernate system.data.sqlite