2

I get the following output when trying to run nunit-console Testsuite.sln

NUnit version 2.4.8
Copyright (C) 2002-2007 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment - 
   OS Version: Unix 11.4.0.0
  CLR Version: 2.0.50727.1433 ( 2.10.11 (mono-2-10/2baeee2 Wed Jan 16 16:40:16 EST 2013) )

Missing method .ctor in assembly /Users/administrator/Desktop/projectname/testsuite/bin/Debug/Testsuite.dll, type NUnit.Framework.TestFixtureAttribute
Can't find custom attr constructor image: /Users/administrator/Desktop/projectname/testsuite/bin/Debug/Testsuite.dll mtoken: 0x0a000004
Could not load file or assembly 'nunit.framework, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies.

Any suggestions? Running the test from the testrunner in mono develop works without problems.

Charles
  • 50,943
  • 13
  • 104
  • 142
David Müller
  • 5,291
  • 2
  • 29
  • 33

1 Answers1

3

It's not finding your nunit.framework.dll file, I think you have a borked installation. How did you install mono? How did you install NUnit?

Although I would recommend to fix your mono/nunit installation first, a possible workaround would be:

  1. Find where is nunit.framework.dll, by doing for example: find /usr | grep nunit
  2. Run nunit this way:

MONO_PATH=/path/where/nunit/dlls/are nunit-console4 Testsuite.dll

knocte
  • 16,941
  • 11
  • 79
  • 125
  • Thank you so much, this worked! I have not found any nunit.framework.dll at all - mono was installed by Xamarin (formerly Mono Touch). Maybe this is the reason why the mono installation was not properly. – David Müller Mar 18 '13 at 09:49
  • oh, I thought you were in Linux; then open a bug in http://bugzilla.xamarin.com/ and they will fix it right away so you don't need the hack anymore – knocte Mar 18 '13 at 09:54