Bla*_*man 0 sqlite nhibernate fluent-nhibernate
我有一个测试项目,我试图使用sql lite内存数据库测试我的nhibernate层.
我收到错误:
无法从NHibernate.Driver.SQLite20Driver,NHibernate,Version = 3.1.0.4000创建驱动程序,
private void CreateSessionFactory()
{
_sessionFactory = Fluently
.Configure()
.Database(_dbType)
.Mappings(m => m.FluentMappings
.AddFromAssemblyOf<UserMap>())
.ExposeConfiguration(cfg => _configuration = cfg)
.BuildSessionFactory();
}
Run Code Online (Sandbox Code Playgroud)
我正在使用fluentnhibernate和nunit.
问题可能是什么?
更新
我从http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki下载了x64(我在Windows 7 64位上) ,现在我收到了这个错误:
Unable to load DLL 'SQLite.Interop.DLL': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Run Code Online (Sandbox Code Playgroud)
如果我尝试在vs.net 2010中添加Interop.dll,它不会让我说它无法添加,请确保它是有效的等.
最新版本的SQLite for .NET分发为2个dll.
这两个dll都需要与EXE位于同一个文件夹中.Interop dll是特定于平台的,因此您必须手动(或后期构建)复制x86或x64版本.
另外要记住的是SQLite.Interop.dll itslef依赖于MSVCR100.DLL(Visual C++ 2010 SP1可再发行组件包的一部分).你可以在这里得到它:
| 归档时间: |
|
| 查看次数: |
5592 次 |
| 最近记录: |