Jeff.
I’ve been trying to get SL4 NUnit tests to run via the nunit console. After a bit of fussing, I got it to work. I had to rebuild nunit with 4.0 as my target framework.
The error I was getting from nunit was a TargetFrameworkAttribute missing from mscorlib. It wouldn’t even load the assembly. Well, if you build nunit with mscorlib 2.0.5.0 or later, this attribute is present, and the problem goes away.
The nunit gui runner still crashes, but I don’t use that. I run testdriven.net from inside vs2010 for my interactive tests. I needed the console to work so I can get it set up Cruise Control.
From porting the project over from Silverlight 3, there way an old version of Microsoft.Silverlight.Testing assembly kicking around in a bin directory – which made the project work happily, unless of course you’re working on a different computer than mine… D-uh. Inside the Microsoft.Silverlight.Testing namespace, there have been some breaking changes (an interface ITestHarness has been removed); and referencing this type caused a TypeLoadException. The project has been fixed; NUnit.Silverlight.Metadata is now version 1.0.1 and does not reference that interface any more. Sorry for the screw-up.
The NUnit unit test provider should now be fit for all means and purposes, including the browser UI runner.
Hey christian, you mentioned that the problem has been fixed? i’ve been using your recent 2.5.5 release and i’m hitting the same error as Pete is with the GUI runner.
Hmm, interesting. I think I can positively say that I myself got the same problem and fixed it, but haven’t heard from Pete afterwwards. I’m currently in Vietnam without much time the laptop I’ve got the project on at hands; I’ll try to repro when I get home.
In order to see that I can or can’t get the exact same problem as you: can you send me a call stack?