Rick Herrick Central - Hi there.  Rick Herrick Central - Hi there.

  • about
Home › Blogs › rherrick's blog

Updating TestDriven.NET NUnit versions

rherrick — Tue, 09/15/2009 - 10:44

I'm currently evaluating .NET rules engines.  A lot of these are "documented" strictly through their unit tests, most of which are implemented with NUnit.  So I downloaded the most recent version, 2.5.2.9222 as of this writing, and installed that.  But I had forgotten that NUnit does not, by itself, integrate into Visual Studio.  Heavy sigh.  So I downloaded a copy of TestDriven.NET and installed that.

The problem is that, when I tried to run the unit tests out of Visual Studio 2008, I got the following error message:

------ Test started: Assembly: UnitTests.dll ------

The packaged version of NUnit is older than 2.5.2.9222.
Please install the latest version of TestDriven.Net:
http://www.testdriven.net/download.aspx

or install NUnit 2.5.2.9222 or later:
http://nunit.com/index.php?p=download

As it happens, the version of TestDriven.NET that I installed, 2.23.2497, comes with NUnit 2.5.1.9189. Apparently someone's aware of the fact that I have a later version installed and doesn't want to play nice. The fix for this is easy enough, however.

I found the nunit.config file in the NUnit\2.5 subfolder of my TestDriven.NET installation.  This contains the following:

<?xml version="1.0" encoding="utf-8" ?>
<nunit>
  <info runtimeVersion="v1.1.4322" baseDir="net-1.1" productVersion="2.5.1.9189" />
  <info runtimeVersion="v2.0.50727" baseDir="net-2.0" productVersion="2.5.1.9189" />
</nunit>

That looks like the problem, right?  So I just changed the baseDir and productVersion attribute values to point at my other installation:

<?xml version="1.0" encoding="utf-8" ?>
<nunit>
  <info runtimeVersion="v1.1.4322" baseDir="c:\Work\NUnit-2.5.2.9222\bin\net-1.1" productVersion="2.5.2.9222" />
  <info runtimeVersion="v2.0.50727" baseDir="c:\Work\NUnit-2.5.2.9222\bin\net-2.0" productVersion="2.5.2.9222" />
</nunit>

You want that baseDir value to point to the folder in your NUnit installation where nunit.exe can be found. Where that happens to be depends on the type of installation you have.  I just installed mine from the Zip files, so that's why it looks that way.

Bookmark/Search this post with:
  • Delicious
  • Digg
  • Reddit
  • Facebook
  • Google
  • Yahoo
  • Technorati
  • rherrick's blog
  • Login or register to post comments
  • Delicious
  • Digg
  • Reddit
  • Facebook
  • Google
  • Yahoo
  • Technorati

  • Facebook
  • LinkedIn
  • Twitter
  • Contact

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password

Recent blog posts

  • The Wedding Grinch
  • Layout
  • Apparently
  • Louie
  • Today's Senate is not the original Senate
  • Explosive new video! Or not...
  • Bilderbergers and the lack of sanity in the GOP and Tea Party
  • Flying windmills
  • Scott McNealy's Curriki and free textbooks
  • A great point
more

Search

Powered by Drupal, an open source content management system
  • about

© 1998-2008, Rick Herrick, all rights reserved although I'm sure I'll give you permission to use whatever you want if you ask nicely