NHibernate and SQLite Exception

When I try to deploy the mapped table to the database using GenerateSchema..i get an exception:

NHibernate.HibernateException: Failed to create driver from NHibernate.Driver.SQLiteDriver. ---> System.Reflection.TargetInvocationException: An exception was thrown by the target of the call. ---> NHibernate.HibernateException: implementation of IDbCommand and IDbConnection in SQLite.NET assembly not found. Verify that the SQLite.NET assembly is in the application directory or in the global assembly cache. If the assembly is in the GAC, use the item in the application configuration file to specify the fully qualified name of the assembly.

I tried to solve this using NHibernate.Driver.SQLiteDriver -> NHibernate.Driver.SQLite20Driver..but did not work. I have added all the links for NHibernate, Sqlite..Linfu ...

Are there any ideas for a solution?

+3
source share
1 answer

Blow in the dark:

The only thing that always calls me with SQLite is that it is a mixed assembly; it contains both managed and native code and is aimed at one configuration (usually x86). If you work with a 64-bit operating system and use the x86 version, you may have bit problems. Unfortunately, this does not lead to a useful error message.

x86 , . , , SQLite. ( " " ) . (, "System.Data.SQLite.DLL" ).

, .

+5

Source: https://habr.com/ru/post/1730713/


All Articles