MVC2 / nHibernate / nUnit 测试在构建服务器上失败
我有一个使用 nUnit 2.5、nHibernate 2.1 的 C# 4.0 MVC 2 应用程序。
我有一个 TestFixture 在本地运行时通过(Windows 7(64 位)),但在构建服务器(Windows Server 2003(64 位))上编译时失败
测试失败的代码在 [SetUp] 中定义
_session = NHibernateSession.GetDefaultSessionFactory().OpenSession();
new SchemaExport(configuration).Execute(false, true, false, _session.Connection, null);
:我得到的错误是:
Database was not configured through Database method. ----> Hibernate.HibernateException : Could not create the driver from NHibernate.Driver.SQLite20Driver.
任何帮助将不胜感激!
谢谢
I have a C# 4.0 MVC 2 application using nUnit 2.5, nHibernate 2.1.
I have a TestFixture that passes when ran locally (Windows 7 (64bit)), but fails when is compiled on the build server (Windows Server 2003 (64bit))
The code that the test fails on is defined in the [SetUp]:
_session = NHibernateSession.GetDefaultSessionFactory().OpenSession();
new SchemaExport(configuration).Execute(false, true, false, _session.Connection, null);
The error I get is:
Database was not configured through Database method. ----> Hibernate.HibernateException : Could not create the driver from NHibernate.Driver.SQLite20Driver.
Any help would be greatly appreciated!!
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须在运行单元测试的服务器上安装 SQLite。或者至少将 dll 添加到 gac 中。
You have to install SQLite on the server which is running the unit test. Or at least add the dll to the gac.