司機我有我試圖使用SQL精簡版的內存數據庫來測試我的NHibernate層一個測試項目。無法創建NHibernate.Driver.SQLite20Driver,NHibernate的,版本= 3.1.0.4000
,我發現了錯誤:
無法創建NHibernate.Driver.SQLite20Driver,NHibernate的,版本= 3.1.0.4000司機,
private void CreateSessionFactory()
{
_sessionFactory = Fluently
.Configure()
.Database(_dbType)
.Mappings(m => m.FluentMappings
.AddFromAssemblyOf<UserMap>())
.ExposeConfiguration(cfg => _configuration = cfg)
.BuildSessionFactory();
}
我使用fluentnhibernate,和nunit也。
問題是什麼?
更新
我下載了64(我在Windows 7 64位)從http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki,現在我收到此錯誤:如果我嘗試添加
Unable to load DLL 'SQLite.Interop.DLL': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
在vs.net 2010中的Interop.dll,它不會讓我說它不能被添加,請確保它是有效的。
爲什麼拒絕我時,通過「添加引用」添加它添加到我的項目的任何想法,sql.data.sqlite加罰款。 – Blankman
* SQLite.Interop.dll *不是託管的DLL,您不能將其添加爲.NET項目的引用。它應該手動複製。 – Dmitry
這不再適用。如果你在windows上運行sqlite安裝程序,它將構建入主System.Data.SQLite.dll的ineterop。這是你需要帶到派對上的唯一東西 –