gpt4 book ai didi

sqlite - 运行 Fixtures : Unable to find the requested .Net Framework 数据提供程序时出现 Sql Lite 错误。它可能没有安装

转载 作者:行者123 更新时间:2023-12-03 18:37:54 25 4
gpt4 key购买 nike

任何人都可以请帮助解决这个问题..
谷歌搜索后我尝试了一些保存的东西,但没有运气......

在我的项目中运行固定装置时会发生此错误。

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



这是堆栈跟踪
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()

我试图通过更改测试设置并通过包管理器控制台加载所需的 sql lite 包来解决它。
我正在运行 64 位系统。任何机构都可以帮助我找出可能是什么问题吗?

请帮忙,
谢谢

最佳答案

native SqlLite dll 是在编译路径中还是在全局程序集缓存中?

您是否有 native SqLite.dll 的 64 位版本(SqLite dll 包含非托管代码,并且必须与您的项目构建具有相同的 (64/32))。

如果您强制您的项目构建为 32 位,那么它可以工作吗?

关于sqlite - 运行 Fixtures : Unable to find the requested .Net Framework 数据提供程序时出现 Sql Lite 错误。它可能没有安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14854598/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com