I’m trying to get the NUnit task working.  Every time I run it, that doesn’t clearly error out, it gives me “0 Tests run”. I know there are tests in there because I can get the tests to run and pass directly in the NUnit UI or in Visual Studio .NET. 

 

Below is an example of one of the many things I’ve tried.  I’ve tried every combination of paths I can think of.  In the end I was using full paths. This last one is pointing to the UnitTests DLL.  The full path to the DLLs that are being tested is “C:\CODEHIVE_CVS\HEFII\GDNII\DataLayer\bin\Debug\”. There are two DLLs in there.  “GDNII.DataLayer.dll” and “GDNII.Library.dll”.

 

<project name="Simple" default="build" filename="boink">

        <description>Data Layer stuff</description>

        <property name="debug" value="true"/>

       

            <nunit2>

                        <formatter type="Plain" />

                        <test assemblyname="C:\CODEHIVE_CVS\HEFII\GDNII\DataLayer\UnitTests\bin\Debug\GDNII.UnitTests.DLL" appconfig="C:\CODEHIVE_CVS\HEFII\GDNII\DataLayer\Config\Tricare\GDN\Data\DataManager.config" />

            </nunit2>

</project>

 

 

Other info:

In the DataManager.config file I have put in the bindings or what ever they are called (See below). 

            <runtime>

                        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

                                    <dependentAssembly>

                                                <assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="Neutral" />

                                                <bindingRedirect oldVersion="2.0.6.0" newVersion="2.2.0.0" />

                                                <bindingRedirect oldVersion="2.1.4.0" newVersion="2.2.0.0" />

                                    </dependentAssembly>

                        </assemblyBinding>

            </runtime>

 

 

 

However, I am getting the message below just before it tells me there are no tests to run.

=============================================================

C:\CODEHIVE_CVS\HEFII\GDNII\DataLayer\UnitTests>nant

NAnt 0.85 (Build 0.85.1766.0; nightly; 11/1/2004)

Copyright (C) 2001-2004 Gerry Shaw

http://nant.sourceforge.net

 

Buildfile: file:///C:/CODEHIVE_CVS/HEFII/GDNII/DataLayer/UnitTests/default.build

 

Target(s) specified: build

 

   [nunit2] Assembly "C:\CODEHIVE_CVS\HEFII\GDNII\DataLayer\UnitTests\bin\Debug\

GDNII.UnitTests.DLL" is using version 2.1.4.0 of the NUnit framework. If any pro

blems arise, then either rebuild this assembly using version 2.2.0.0 of the NUni

t Framework or use a binding redirect from version 2.1.4.0 to version 2.2.0.0 of

 the NUnit Framework.

   [nunit2] Tests run: 0, Failures: 0, Not run: 0, Time: 0 seconds

   [nunit2]

   [nunit2]

   [nunit2]

 

BUILD FAILED - 0 non-fatal error(s), 1 warning(s)

 

Target 'build' does not exist in this project.

 

Total time: 0.5 seconds.

=============================================================

 

I normally work as a function tester but have been given the fine joy of developing build scripts and unit tests for our .NET C# code which I have very little experience in.  So, if you could run your responses through a developer to rock translator I would appreciate it. ;-)

 

Thanks,

 

MArk B.

Reply via email to