[英]visual studio 2012 MSTest.exe cannot load ADO.NET provider SQLite & NHibernate
我有一些使用NHibernate和SQLite的测试来测试内存中的数据库组件。 测试可以在Visual Studio中正常运行,但是MSTest.exe控制台运行程序拒绝运行我的所有测试。 使用TeamCity的Build Server使用控制台运行程序来运行所有测试,并且我在计算机上使用MSTest.exe来查看本地控制台运行程序也失败。
我有这个内部异常:
NHibernate.HibernateException: Could not create the driver fromNHibernate.Driver.SQLite20Driver, NHibernate, Version=3.3.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4. ---> 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
大多数对此的答复包括将正确的引用程序集添加到App.config中,以供sqlite使用,但是测试项目是一个类库。
在我的测试项目中,我引用了以下程序集:
ClassInitialize的签名错误。 参数1的类型应为Microsoft.VisualStudio.TestTools.UnitTesting.TestContext
我使用以下工具:
任何想法如何进行呢? 谢谢 !
好的,最后我使用vstest.console.exe控制台运行程序来执行测试,并且可以正常工作。 (不知道那里出了什么问题)如果您有兴趣将此跑步者与Teamcity结合使用,请阅读以下文章: http ://blog.dontpaniclabs.com/post/2013/06/13/TeamCity-Builds-with- -Visual-Studio-2012-Test-Runner
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.