Hi Matt,
 
Thanks a ton for explaining how to build solution with NUnit and giving a example. Highly appreciated.

I will try my hands on it and inform you offline whether I am successful or not.

Thanks!
Cheers

Matt Ward <[EMAIL PROTECTED]> wrote:
Hi,

Here's an example of using an NUnit task and building a solution,
hopefully this will shed some light on the problem.

Assumptions
-------------------

Using Nant 0.85.1754 - Should work with any 0.85
Using NUnit 2.2

.Net project structure
-------------------------------

TestApp\TestApp.sln
TestApp\TestApp.TestApp\TestApp.TestApp.csproj
TestApp\TestApp.Core\TestApp.Core.csproj
TestApp\TestApp.Tests\TestApp.Tests.csproj
TestApp\bin\
TestApp\TestApp.build

TestApp.sln - Contains the projects TestApp.TestApp, TestApp.Core and
TestApp.Tests.

TestApp.TestApp - A console application that references classes in TestApp.Core
TestApp.Core - Contains classes used by the console application.
TestApp.Tests - Contains NUnit test fixtures that test the
TestApp.Core classes. Uses NUnit 2.2.

All pro jects build to the same TestApp\bin directory.

Build script
----------------

























The "build" target uses the task to build all the projects
in the solution.

The "test" target runs the NUnit tests in TestApp.Tests.dll.

Nant 0.84
--------------

If you are using Nant 0.84 then you should use NUnit 2.1.4.0. From my
investigations, Nant 0.84 will not work with NUnit 2.2.

In the example above, the build file will work with Nant 0.84, but the
TestApp.Tests project will need to reference the NUnit 2.1.4.0
assembly.

Rgds,

Matt.


Do you Yahoo!?
Yahoo! Mail � CNET Editors' Choice 2004. Tell them what you think.

Reply via email to