Problem with SQLite related nUnit-tests after upgrade to VS2010 and Re#5
Posted
by stiank81
on Stack Overflow
See other posts from Stack Overflow
or by stiank81
Published on 2010-04-22T07:37:43Z
Indexed on
2010/04/22
7:43 UTC
Read the original article
Hit count: 379
After converting to Visual Studio 2010 with ReSharper5 some of my unit tests started failing. More specifically this applies to all unit tests that use NHibernate with SQLite. The problem seem to be related to SQLite somehow. The unit tests that does not involve NHibernate and SQLite are still running fine.
The exception is as follows:
NHibernate.HibernateException : Could not create the driver from NHibernate.Driver.SQLite20Driver, NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4.
----> System.Reflection.TargetInvocationException : Exception has been thrown by the
target of an invocation.
----> NHibernate.HibernateException : The IDbCommand and IDbConnection implementation
in the assembly System.Data.SQLite could not be found. Ensure that the assembly
System.Data.SQLite is located in the application directory or in the Global
Assembly Cache. If the assembly is in the GAC, use <qualifyAssembly/> element
in the application configuration file to specify the full name of the assembly.
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
The exception is the NullReferenceException on TearDown when cleaning up NHibernate objects that wasn't successfully created, but the problem seem to be related to SQLite somehow.
I run my unit tests through ReSharper, but I get the same exception when running them directly through the NUnit.exe application. However, running them through the x86 variant (NUnit-x86.exe) all tests run fine. Can it be related to some mixing of 64bit and 32bit dlls? It still runs fine through VS2008 + ReSharper4.5.
Note that the target framework of my projects still is .NET3.5.
Anyone seen this problem before?
© Stack Overflow or respective owner