[英]Unable to load DLL 'SQLite.Interop.dll' with nHibernate in NUnit
I've installed FluentNHibernate
and System.Data.SQLite.MSIL
with Nuget. 我已经用Nuget安装了FluentNHibernate
和System.Data.SQLite.MSIL
。
I wrote some unit tests and tried to execute them. 我编写了一些单元测试并尝试执行它们。 But my test setup is failing miserably: 但是我的测试设置失败了:
Probel.NDoctor.Statistics.UnitTests.SQLite.ChartQueryTest (TestFixtureSetUp): SetUp : FluentNHibernate.Cfg.FluentConfigurationException : An invalid or incomplete configuration was used while creating a SessionFactory. Probel.NDoctor.Statistics.UnitTests.SQLite.ChartQueryTest(TestFixtureSetUp):设置:FluentNHibernate.Cfg.FluentConfigurationException:创建SessionFactory时使用了无效或不完整的配置。 Check PotentialReasons collection, and InnerException for more detail. 检查PotentialReasons集合和InnerException以获取更多详细信息。
----> System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. ----> System.Reflection.TargetInvocationException:调用的目标抛出了异常。 ----> System.DllNotFoundException : Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. ----> System.DllNotFoundException:无法加载DLL'SQLite.Interop.dll':找不到指定的模块。 (Exception from HRESULT: 0x8007007E) (来自HRESULT的异常:0x8007007E)
Well, Nuget didn't import SQLite.Interop.dll
when I installed the package System.Data.SQLite.MSIL
... 好吧,当我安装软件包System.Data.SQLite.MSIL
时,Nuget没有导入SQLite.Interop.dll
...
I'm using: 我正在使用:
NHibernate 3.3.1.4000
(installed when I installed FluentNHibernate 1.3.0.733
) NHibernate 3.3.1.4000
(我安装FluentNHibernate 1.3.0.733
时安装) System.Data.SQLite.MSIL
NUnit 2.6.2.12296
Note all these dll import was dont via Nuget. 请注意,所有这些dll导入都不是通过Nuget进行的。
The 'SQLite.Interop.dll' is contained in the System.Data.SQLite
Nuget package. “ SQLite.Interop.dll”包含在System.Data.SQLite
Nuget包中。 The System.Data.SQLite.MSIL
package you installed only contains the ADO.NET provider. 您安装的System.Data.SQLite.MSIL
程序包仅包含ADO.NET提供程序。 Just uninstall System.Data.SQLite.MSIL
and install System.Data.SQLite
which has the ADO.NET provider and the unmanaged library. 只需卸载System.Data.SQLite.MSIL
并安装具有ADO.NET提供程序和非托管库的System.Data.SQLite
。 That should fix your issue. 那应该解决您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.