简体   繁体   English

无法在NUnit中使用nHibernate加载DLL'SQLite.Interop.dll'

[英]Unable to load DLL 'SQLite.Interop.dll' with nHibernate in NUnit

I've installed FluentNHibernate and System.Data.SQLite.MSIL with Nuget. 我已经用Nuget安装了FluentNHibernateSystem.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
  • Visual Studio 2010 Visual Studio 2010

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.

相关问题 无法加载 DLL“SQLite.Interop.dll” - Unable to load DLL 'SQLite.Interop.dll' 无法加载SQLite.Interop.dll - Unable to Load SQLite.Interop.dll “无法在客户端计算机上加载DLL'SQLite.Interop.dll'错误 - "Unable to load DLL 'SQLite.Interop.dll' error on client machine 部分客户端无法加载 SQLite.Interop.dll - Some clients are unable to load SQLite.Interop.dll 无法加载 SQLite.Interop.dll C# - Unable to load SQLite.Interop.dll C# 无法引用 SQLite.interop.dll - Unable to reference SQLite.interop.dll 无法加载DLL'SQLite.Interop.dll' - 在构建时删除DLL - Unable to load DLL 'SQLite.Interop.dll' - Dll being removed on build SQlite using语句给出了无法在另一台计算机上加载DLL'SQLite.Interop.dll'错误 - SQlite using statement gives Unable to load DLL 'SQLite.Interop.dll' error on another computer 无法加载DLL'SQLite.Interop.dll':找不到指定的模块。 Windows Server 2012上的错误 - Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. Error on Windows Server 2012 尽管出现错误“无法加载DLL'SQLite.Interop.dll'”,尽管它位于bin文件夹中 - Getting error “Unable to load DLL 'SQLite.Interop.dll'” despite it being in the bin folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM