构建服务器上的MVC2 / nHibernate / nUnit测试失败

时间:2011-07-13 09:46:11

标签: nhibernate asp.net-mvc-2 nunit 64-bit cvs

我有一个使用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. 

非常感谢任何帮助!!

由于

1 个答案:

答案 0 :(得分:0)

您必须在运行单元测试的服务器上安装SQLite。或者至少将dll添加到gac中。