[Mono-list] Nunit console problem

Gonzalo Paniagua Javier gonzalo@ximian.com
14 Aug 2003 22:05:34 +0200


El jue, 14-08-2003 a las 20:06, Kris Luyten escribió:
> Hi, I try to use Nunit tests, but the "nunit-console" application always
> throws a "FileNotFoundException". It is Nunit version 2.0.9.
> 
> I execute the test as follows: "mono `which nunit-console.exe`
> nunit.tests.dll"
> I also tried to execute: "mono `which nunit-console.exe`
> /assembly:nunit.tests.dll" (it does not recognize the assembly opton
> apparantly.
> 
> I always get:
> Unhandled Exception: System.IO.FileNotFoundException: File 'nunit.tests'
> not found.

nunit uses Assembly.Load () to load the assembly passed as argument.
What does that mean? That you need to prepend '.' (a dot) to MONO_PATH
(export MONO_PATH=.:$MONO_PATH) or copy nunit.tests.dll to any directory
already in MONO_PATH.


MONO_PATH=".:$MONO_PATH" mono `which nunit-console.exe` nunit.tests.dll

should work.

-Gonzalo