Friday, October 1, 2010

NHibernate.Driver.SQLite20Driver Exception

To fix below error, make sure to add reference System.Data.Sqlite and Copy Local = True in the properties window.


FluentNHibernate.Cfg.FluentConfigurationException : An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.

* Database was not configured through Database method.

----> NHibernate.HibernateException : Could not create the driver from NHibernate.Driver.SQLite20Driver.
----> System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
----> 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 element in the application configuration file to specify the full name of the assembly.

No comments:

Post a Comment