This course -  Installing NUnit 2.2 for VS.NET 2005

v1.0 - last updated: 08/07/2006

Getting NUnit to work with the .NET Framework 2.0 (rather than earlier versions) was not as straightforward as it could be.  Here's how to do it; there are six steps...

  1. Download the latest version of NUnit and install it.  Remember the folder where it's installed for Step 3, below.  After the install, reboot your PC (even though it doesn't make you).

  2.  
  3. Snoop out the actual version numbers of the .NET Framework 2.0 that you have on your PC by looking under your system directory, such as C:\WINDOWS\Microsoft.NET\Framework: =

  4.  
  5. Use Windows Explorer to browse to the \bin folder underneath where you installed NUnit in Step 1 (for me, that was folder D:\apps\NUnit\bin).

     
  6. You must record the correct .NET Framework numbers in two XML files in your install folder.  The XML files are named nunit-gui.exe.config and nunit-console.exe.config; open them with Notepad by right-clicking over each file name:

    In each file, arrange the tags within the <startup> tag to reflect the priority order in which you want NUnit to search for .NET frameworks (usually, you'll want to place the latest version first).  Make sure the versions exactly match those shown in Step 2 above.  For me, the entry ended up being like this:
      <startup>
              <supportedRuntime version="v2.0.50215" />
    	  <supportedRuntime version="v1.1.4322" />
    	  <supportedRuntime version="v1.0.3705" />
    	  <requiredRuntime version="v1.0.3705" />
      </startup>
  7. Run NUnit GUI and look in its Help menu to get the About form.  Verify that it has found the first .NET Framework version that you specified (v2.0.50215 in my example) by looking at the bottom of the About window:

  8.  
  9. Now test the installation by downloading the Counter sample project; build the project, and try running NUnit against the executable file.  Your NUnit output, if successful, will look like something like this:

     

Visitors:   Hit Counter