.net - Cannot run mspec.exe with Syste.Data.SQLite.dll x86, but it works in R# MSpec runner -


I use mspec for my tests and tests are a NHiernate setup by using SQLite x86 for my database The problem is that when I run my test using mspec r # runner, everything works fine but running it from the console causes an error that sqlite dll can not be found.

My configuration of specification projects

.net 4

x86 (using x86 version of sqlite)

System.Data. SQLite, version = 1.0.64.0, culture = neutral, publicKeyToken = db937bc2d44ff139 mspec, version = 0.3.0.0, culture = neutral, public keynote = zero, target runtime: v4.0.30319, target: x86

MSpec source is made from. In the reflector MSPC is designed for X86 as XE - which seems right for my setup and as it has been said that R # is running fine using the runner.

NHibernate.HibernateException: Could not make driver NHibernate.Driver.SQLite20Driver, NHibernate, version = 2.1.2.4000, Culture = Neutral, PublicKeyToken = aa95f207798dfdb4 ---> system reflection. Target invocation exception: An exception has been thrown to the goal of a greeting. ---> NHibernate.HibernateException: IDbCommand and IDbConnection Assembly System. Implementation was not found in Data.SQLite. Make sure that the assembly system. SQLite is located in the application directory or in the global assembly cache. If the assembly is in GAC, use the element in the application configuration file to specify the full name of the assembly. On NHibernate.Driver.ReflectionBasedDriver..ctor (anyone has an idea that anyone in the string driverexample, string connection typename, string command typing name) NHibernate.Driver.SQLite20Driver..ctor ()

How to fix it?

Chris

I got an accused error by using Fuslogvw.exe (Thank you for the signal;): "Rejecting the IJW module against v2.0.50727 as it can be loaded in any other order in this process."

Adding an mspec.exe.config like:

  & lt; Configuration & gt; & Lt; Startup Usage Legacy V2RuntimeActivationPolicy = "true" & gt; & Lt; / Startup & gt; & Lt; / Configuration & gt;  

To solve this issue, now my test runas are expected.

Thanks & amp; Greetings,

Chris


Comments