[Mono-list] nunit-console

Yuri Leikind y.leikind@sam-solutions.net
Wed, 26 May 2004 17:57:32 +0300


Hello all,

If an NUnit  test references types in some other assembly, and is compiled with /r:SomeOtherAssembly.dll,
should nunit-console load this assembly at runtime, or should I run nunit-console with this assembly
as one of the input files.

I am asking because both variants just don't work for me.

The test is compiled with this command:

      mcs /r:NUnit.Framework.dll,dict.dll /target:library  /out:tests/tests.dll  tests/tests.cs

As you see, tests/tests.dll references dict.dll in the current directory.

Now I run the test:

leikind@pc324:~/cs/dict$ nunit-console  /nologo  ./tests/tests.dll

** (/usr/share/dotnet/bin/nunit-console.exe:16921): WARNING **: Could not find assembly dict
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object

Server stack trace: 
in (unmanaged) /usr/lib/libmono.so.0 [0x400c76e2]
[LINES SKIPPED BY ME]
in <0x00177> System.Runtime.Remoting.RemotingServices:InternalExecuteMessage (System.MarshalByRefObject,System.Runtime.Remoting.Messaging.IMethodCallMessage)


Exception rethrown at [0]: 

in <0x0028f> NUnit.Core.TestDomain:LoadAssembly (string,string)
in <0x00095> NUnit.Util.NUnitProject:LoadTest (NUnit.Core.TestDomain,string)
in <0x0016d> NUnit.Console.ConsoleUi:MakeTestFromCommandLine (NUnit.Core.TestDomain,NUnit.Util.ConsoleOptions)
in <0x0016d> NUnit.Console.ConsoleUi:Main (string[])




Ok. now let's give dict.dll as an argument:

leikind@pc324:~/cs/dict$ nunit-console  /nologo  dict.dll  ./tests/tests.dll
Unhandled Exception: System.DllNotFoundException: shlwapi.dll
in <0x00053> (wrapper managed-to-native) NUnit.Util.ProjectPath:PathCanonicalize (System.Text.StringBuilder,string)
in <0x00038> NUnit.Util.ProjectPath:Canonicalize (string)
in <0x0001a> NUnit.Util.ProjectPath:RelativePath (string,string)
in <0x0015f> NUnit.Util.ProjectConfig:get_PrivateBinPath ()
in <0x00154> NUnit.Util.NUnitProject:LoadTest (NUnit.Core.TestDomain,string)
in <0x0016d> NUnit.Console.ConsoleUi:MakeTestFromCommandLine (NUnit.Core.TestDomain,NUnit.Util.ConsoleOptions)
in <0x0016d> NUnit.Console.ConsoleUi:Main (string[])


What am I doing wrong?

I use Mono 0.31 packages from Debian Unstable.

-- 
Best regards,
Yuri Leikind