Can anybody please help to resolve this issue..
I tried saveral things after googling but yet no luck…
This error occurs while running fixtures in my project.
NHibernate.HibernateException : Could not create the driver from
NHibernate.Driver.SQLite20Driver.
System.Reflection.TargetInvocationException : Exception has been
thrown by the target of an invocation. System.ArgumentException :
Unable to find the requested .Net Framework Data Provider. It may not
be installed
Here is the stack trace
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings)
at NHibernate.Connection.ConnectionProvider.Configure(IDictionary`2 settings)
at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary`2 settings)
at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary`2 properties)
at NHibernate.Cfg.Configuration.BuildSettings()
at NHibernate.Cfg.Configuration.BuildSessionFactory()
at MyApp.Common.Testing.UnitOfWorkTestContext.NHibernateUnitOfWorkTestContext.get_SessionFactory() in UnitOfWorkTestContext.cs: line 199
at MyApp.Common.Testing.UnitOfWorkTestContext.NHibernateUnitOfWorkTestContext.IntialiseContainerAndUowFactory() in UnitOfWorkTestContext.cs: line 243
at MyApp.Common.Testing.DatabaseFixture.OneTimeSetup() in DataBaseFixture.cs: line 66
--TargetInvocationException
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, ref Boolean canBeCached, ref RuntimeMethodHandleInternal ctor, ref Boolean bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type)
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings)
--ArgumentException
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
at NHibernate.Driver.ReflectionBasedDriver..ctor(String providerInvariantName, String driverAssemblyName, String connectionTypeName, String commandTypeName)
at NHibernate.Driver.SQLite20Driver..ctor()
I tried to resolve it by changing the test settings and loading required sql lite package via package manager console.
I am running 64Bit system. Can any body help me to figure out what could be the issue?
Please help,
Thanks
Is the native SqLite dll in compile path or in global assembly cache?
Do you have a 64bit version of the native SqLite.dll (SqLite dll contains unmanaged code and must have the same (64/32) as you project build).
If you force your project build to 32-bit does it work then?