Oto kod, który wywołuje wyjątekNie można utworzyć sterownik z NHibernate.Driver.SQLite20Driver
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;
}
Pełny tekst wyjątek:
Failure: NHibernate.HibernateException: Nie można utworzyć sterownik od NHibernate.Driver.SQLite20Driver, NHibernate, wersja = 2.1.2.4000, Kultura = neutralny, PublicKeyToken = aa95f207798dfdb4.
----> System.Reflection.TargetInvocationException: Wyjątek został zgłoszony przez cel wywołania.
----> NHibernate.HibernateException: Implementacja IDbCommand i IDbConnection w zespole System.Data.SQLite nie może być znaleziona . Upewnij się, że zestaw System.Data.SQLite znajduje się w katalogu aplikacji lub w pamięci podręcznej Global Assembly Cache. Jeśli zestaw znajduje się w GAC, użyj elementu w pliku konfiguracyjnym aplikacji , aby podać pełną nazwę zespołu .
Wersja NHibernate jest 2.1.2.4000
Wersja System.Data.SQLite jest 1.0.66.0
ramowa docelowa wynosi 3,5 (x86)
Kopia lokalna dla System.Data.SQLite jest włączony.
Co może być nie tak?
czy widziałeś http://stackoverflow.com/questions/845490/fluentnhibernate-and-sqlite http://stackoverflow.com/questions/1460045/sql-data-sqllite-version-with-nhibernate-2-1 http: // stackoverflow.com/questions/1041271/how-to-configure-sqlite-to-run-with-nhibernate-where-assembly-rozwiązuje-system-dat –