I don't think you need the config file. I don't use one. You do need to ensure that your DLLs are built using the same version of NUnit that is eventually used to run the unit tests.
Noel I do the following: <target name="UnitTest" depends="Build" > <foreach item="File" property="filename"> <in> <items> <include name="${RootDir.Solution}\**\bin\**\*.UnitTests.dll" /> </items> </in> <do> <echo message="Executing unit tests in '${filename}'" /> <nunit2> <formatter type = "Xml" extension=".xml" usefile="true" outputdir="${RootDir.Builds}\Tests" /> <test assemblyname="${filename}" fork="false" /> </nunit2> </do> </foreach> </target> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Burton, Kevin Sent: Monday, July 26, 2004 12:57 PM To: [EMAIL PROTECTED] Subject: [Nant-users] Nunits task? The documentation indicates that I need to add some lines to the test application config file. I didn't have an application config file so I created one: <configuration> <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.1.4.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration> The name of the DLL is TandemTests.DLL so the config file is TandemTests.DLL.Config. I am still getting the error: Build failed D:\Projects\Visa\MR0804\Application Server Code\NUnit Tests\TandemTests\default.build(28,10): NUnit error. Object reference not set to an instance of an object. Total time: 1.5 seconds. Is the configuration file in the wrong place? Here is the task: <nunit2> <formatter type="Plain" usefile="true" outputdir="${build.dir}" /> <test assemblyname="${build.dir}/TandemTests.dll" testname="TandemInterfaceTests.TestHandshake" haltonfailure="true" appconfig="TandemTests.dll.config" /> </nunit2> Any sugestions? Thank you. Kevin Burton [EMAIL PROTECTED] ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idG21&alloc_id040&op=ick _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idG21&alloc_id040&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users