Question

Je pourrais faire une dll pour NUnit NUnit Test en mono , mais quand j'essayé de courir avec nunit-console.exe je reçois le message d'erreur suivant.

Runtime Environment - 
   OS Version: Unix 10.3.0.0
  CLR Version: 2.0.50727.1433 ( 2.6.4 (tarball Thu Apr 22 13:24:33 MDT 2010) )

ProcessModel: Default    DomainUsage: Single
Execution Runtime: mono-2.0

** (/Users/smcho/bin/NUnit-2.5.5.10112/bin/net-2.0/nunit-console.exe:36800): WARNING **: The following assembly referenced from /private/var/folders/m4/m4u1hmP+FHOQaiZbHj1UCk+++TI/-Tmp-/nunit20/ShadowCopyCache/36800_634111616836311880/Tests_-22323139/assembly/shadow/54274fc2/118e035c_45a94c9e_00000001/mut.dll could not be loaded:
     Assembly:   nunit.framework    (assemblyref_index=1)
     Version:    2.5.5.10112
     Public Key: 96d09a1eb7f44a77
System error: Invalid argument


** (/Users/smcho/bin/NUnit-2.5.5.10112/bin/net-2.0/nunit-console.exe:36800): WARNING **: Could not load file or assembly 'nunit.framework, Version=2.5.5.10112, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies.

Qu'est-ce qui pourrait être erroné? Je nunit.framework.dll sous /Users/smcho/bin/NUnit-2.5.5.10112/bin/net-2.0/framework, mais il ne semble pas savoir à ce sujet.

Était-ce utile?

La solution

This is another frustrating point about using NUnit in Mono. As far as I've been able to tell, you need to have all of those missing files (there will be more than just nunit.framework.dll) in the same directory as nunit-console.exe.

There might be a command line option either in mono or nunit-console.exe to specify another directory to search for missing DLLs -- I'm not sure. Barring that, you'll have to copy the missing DLLs into the same folder as nunit-console.exe, or you'll have to cd into the framework folder and use mono ../nunit-console.exe /path/to/my/tests.dll

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top