Try the steps outlined in: http://www.iunknown.com/000342.html
I've copied the text of this page below:

September 30, 2003
Happy together: NUnit 2.1 and NAnt 0.8.3

I figured I'd tackle a simple project while Matthew sleeps this afternoon:
making NAnt 0.8.3 and NUnit 2.1 live happily with one another. Out of the
box, this certainly isn't the case since NAnt 0.8.3 was built against NUnit
2.0.6 and it contains hard references to version 2.0.6 of
nunit.framework.dll.

Here's a set of steps that should make things work:

1. Copy nunit.framework.dll from your NUnit 2.1 install directory (typically
\Program Files\NUnit V2.1\bin) to your NAnt install directory (mine lives in
\Tools\NAnt\bin). 

2. The RemoteTestRunner class has changed between NUnit 2.0 and NUnit 2.1.
This requires a change to the NUnit2TestDomain.cs file from the NAnt 0.8.3
distribution. There are references to an Initialize() method, which has been
removed in NUnit 2.1. Below is a code frag that shows the new code and the
old code. This code frag begins at line 67 of NUnit2TestDomain.cs: 

                if (testcase != null) {
                    runner.TestName = testcase;
                    runner.TestFileName = assemblyFile;
//                    runner.Initialize(testcase, assemblyFile);
                } else {
                    runner.TestFileName = assemblyFile;
//                    runner.Initialize(assemblyFile);
                }

3. Build NAnt by running "nant" on the command line from the NAnt directory.


If you are using Win2K3, and you haven't installed V1.0 of the frameworks,
you're going to be in for a bit more pain:

1. Reset NAnt to use the 1.1 Framework paths. To do this, edit the
NAnt.exe.config file (located in NAnt\bin). Find the frameworks XML element
and change the default attribute's value to "net-1.1".

2. When you build NAnt, it will try and run a set of unit tests against the
newly built version of NAnt. However, the NAnt.exe.config file is created
during the build process, and the unit tests will default to using V1.0 of
the frameworks. To fix this problem, edit NAnt.exe.config in the build
directory (Nant\build\nant-0.8.3.50105-debug\bin on my machine) and change
the frameworks XML element's default attribute's value to "net-1.1". 
3. Re-build NAnt, and the unit tests should all pass. 

If you've completed the above steps, don't forget to replace the files in
Nant\bin with the files you just compiled!

Posted by John at September 30, 2003 02:57 PM | TrackBack 


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 18, 2003 7:38 AM
To: [EMAIL PROTECTED]
Subject: [Nant-users] Cannot use Nant 0.8.4 with NUnit

Hi,

We have fetched the latest build of Nant (0.8.4) which uses NUnit 2.1.3 but
we can only get NUnit 2.1.4 from the source forge website.  Does anyone know
of a work around or where I can get NUnit 2.1.3?

Regards,

David Taylor
Extension: 4496
Email:       [EMAIL PROTECTED]
Mobile:     +44 7966 490138



**************************************************************************** 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to