Reputation: 51093
I've got a unit test in my MonoTouch project that I can't run from inside MonoDevelop -- it fails with "Unix transport error." Poking around on the web it looks like that's associated with the NUnit test runner blowing up, so I thought I'd try using the command-line test runner.
I used MonoDevelop's "Create Package" to build and package up all the DLLs, and then tried running my tests with nunit-console FooTest.dll
. This blows up, but I'm pretty sure it's not for the same reason it blows up inside MonoDevelop. The error message I get is:
** (/Library/Frameworks/Mono.framework/Versions/2.6.7/lib/mono/1.0/nunit-
console.exe:11174): WARNING **: The class System.Action`1 could not be loaded,
used in mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
File or assembly name FooTest, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null, or one of its dependencies, was not found.
I'm new to everything here -- NUnit, MonoTouch, MonoDevelop and .NET -- but it looks like I need to somehow configure NUnit to use the MonoTouch runtime environment. Is that it? And if so, how do I do that?
Upvotes: 1
Views: 818
Reputation: 6770
set $MONO_PATH to the nunit library to be able to run nunit-console. On my machine, the $MONO_PATH declaration is (in my .profile file):
MONO_PATH='/Applications/Beta/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/NUnit/:$MONO_PATH'
Upvotes: 0
Reputation: 26495
There isn't a good way to use NUnit with MonoTouch.
Sorry, I have felt the same pain myself. I will post back if a solution ever surfaces.
Upvotes: 1