IBlog<Johan>

This and that in a developer's life in general

News

Follow johandanforth on Twitter

Random Links

Walkthroughs and Tutorials

NUnit 2.1 and Whidbey

Peter Golde blogs this:

I was very happy to discover that it is trivial to get NUnit 2.1 to work with the Whidbey version of the .NET runtime. If you have the PDC release, you just need to do the following:

First, create a new NUnit directory (say, "NUnit Whidbey") and copy everything from your Program FilesNUnit V2.1 directory over to the new directory. Second, open the two files "bin\nunit-console.exe.config" and "bin\nunit-gui.exe.config" inside a text editor. Right above the other lines that start with "supportedRuntime", add the following line:

<supportedRuntime version="v1.2.30703" />
After that, NUnit runs just fine with Whidbey, and you can test code that uses Whidbey-only features. 

Comments

Jamie Cansdale said:

I'm preparing a version of NUnitAddIn works with Whidbey (and lets you run 1.2 code from VS.NET 2002/2003). If you're interested I can slip you an early version. Just let me know your email address vier my blog.
# January 12, 2004 8:30 PM

juestforbetter said:

Now,this way can use by vs 2005???
# April 1, 2004 5:12 AM

Stijn said:

'After that, NUnit runs just fine with Whidbey, and you can test code that uses Whidbey-only features.'

I can indeed run unit tests on whidbey compiled code, but not all whidbey-only features seems to work. For example when a use generics in a test, it fails. This is the message i get from NUnit : System.TypeLoadException : Error: Signature has invalid ELEMENT_TYPE_* (element type: 0x

Any tips on how to solve this error?
# April 15, 2004 5:38 PM

Johan Danforth said:

I think you'd have to ask someone from the NUnit team about this mate. I've not had chance to play that much with NUnit and Whidbey lately. For random reasons out of my control, I'm suddenly lost in a J2EE project :o
# April 16, 2004 5:18 AM

Sean said:

Getting the same as Mr. Stijn when trying to use generics..


J2EE project? Nooooooooooooooooooooooo. Just grind those beans..
# May 6, 2004 1:57 AM

Stijn said:

Figured out what the problem was. I appended <supportedRuntime version="v1.2.30703" /> at the end of the startup section. Just add it before the v1.1.4322 declaration and everything should work fine.
# May 10, 2004 2:30 PM

Johan Danforth said:

Goody, thanks for the post, it will help others for sure :)
# May 11, 2004 4:11 AM

Emil said:

Im using whidbey on longhorn and tried adding the runtime as you guys said.. still im gettings problems running the gui... here's the problem that appears...

System.IO.FileNotFoundException : File or assembly name 'nunit.core, Version=2.1.92.0, Culture=neutral, PublicKeyToken=null", or one of its dependencies, was not found.

A little help pls. :)
# July 23, 2004 8:22 AM

chema said:

check if you have errors in the configuration file (for example App.config). Errors in this files cause this error message.

# February 14, 2007 7:43 PM