Attention: We are retiring the ASP.NET Community Blogs. Learn more >

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. 

9 Comments

  • 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.

  • Now,this way can use by vs 2005???

  • '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?

  • 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

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





    J2EE project? Nooooooooooooooooooooooo. Just grind those beans..

  • Figured out what the problem was. I appended &lt;supportedRuntime version=&quot;v1.2.30703&quot; /&gt; at the end of the startup section. Just add it before the v1.1.4322 declaration and everything should work fine.

  • Goody, thanks for the post, it will help others for sure :)

  • 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&quot;, or one of its dependencies, was not found.



    A little help pls. :)

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

Comments have been disabled for this content.