I did some digging using Filemon and discovered that it wants the nunit.framework.dll right next to the test case dll.

Anyone can tell me why?

 

In addition, I can’t get the tests to execute, I get the following message:

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

 

There are 25 tests there, and using nunit-console I can run and verify them all, what is wrong?

 

Here is my directory structure:

D:\Code Tools\Boar>dir /ad/b/s

D:\Code Tools\Boar\Bin

D:\Code Tools\Boar\Build

D:\Code Tools\Boar\Docs

D:\Code Tools\Boar\Src

D:\Code Tools\Boar\Tests ß I got the Tests.dll here, and I added nunit.framework.dll

D:\Code Tools\Boar\Vendor

D:\Code Tools\Boar\Bin\Production ß My production code, that the Tests are testing.

D:\Code Tools\Boar\Bin\Tests

D:\Code Tools\Boar\Build\Logs

D:\Code Tools\Boar\Vendor\Lib

D:\Code Tools\Boar\Vendor\Src

 


From: Ayende Rahien [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 09, 2004 7:08 AM
To: '[EMAIL PROTECTED]'
Subject: NAnt & Nunit 2

 

I’m trying to run a simple test script and I get an error:

Anyone can help me?

I added the following to Nant.exe.config

 

    <nant taskpath=".\optional">

        <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>

          <…>

As well as to my test case, but it doesn’t work.

Please help.

 

The error is below (and I got Nunit.framework 2.1.4 referenced from the test case as well as in the same directory as Nant.exe

 

D:\Code Tools\Boar\Build>nant Run.Tests

NAnt 0.84 (Build 0.84.1455.0; net-1.0.win32; release; 26/12/2003)

Copyright (C) 2001-2003 Gerry Shaw

http://nant.sourceforge.net

 

Buildfile: file:///D:/Code Tools/Boar/Build/Boar.Build

Target(s) specified: Run.Tests

 

Prepare:

 

 

Compile:

 

 

Compile.Tests:

 

 

Run.Tests:

 

[Core.Task:nunit2 Generated Exception  - [] <>]

Exception: NAnt.Core.BuildException

Message: NUnit 2.0 Error:

Source: NAnt.NUnit2Tasks

   at NAnt.NUnit2.Tasks.NUnit2Task.RunSingleRemoteTest(NUnit2Test test, String t

estAssembly, EventListener listener)

   at NAnt.NUnit2.Tasks.NUnit2Task.RunRemoteTest(NUnit2Test test, EventListener

listener)

   at NAnt.NUnit2.Tasks.NUnit2Task.ExecuteTask()

   at NAnt.Core.Task.Execute()

 

Nested Exception

 

Exception: System.IO.FileNotFoundException

Message: File or assembly name nunit.framework, or one of its dependencies, was

not found.

Source: mscorlib

 

Server stack trace:

   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, B

oolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Ass

embly locationHint, StackCrawlMark& stackMark)

   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean

stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)

   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence as

semblySecurity, StackCrawlMark& stackMark)

   at System.Activator.CreateInstance(String assemblyName, String typeName, Bool

ean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureI

nfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMar

k& stackMark)

   at System.Activator.CreateInstance(String assemblyName, String typeName, Bool

ean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureI

nfo culture, Object[] activationAttributes, Evidence securityInfo)

   at System.AppDomain.CreateInstance(String assemblyName, String typeName, Bool

ean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureI

nfo culture, Object[] activationAttributes, Evidence securityAttributes)

   at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(M

ethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInC

ontext, Object[]& outArgs)

   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMes

sage msg, Int32 methodPtr, Boolean fExecuteInContext)

 

Exception rethrown at [0]:

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req

Msg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa

ta, Int32 type)

   at System.AppDomain.CreateInstance(String assemblyName, String typeName, Bool

ean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureI

nfo culture, Object[] activationAttributes, Evidence securityAttributes)

   at NAnt.NUnit2.Tasks.NUnit2TestDomain.CreateTestRunner(AppDomain domain)

   at NAnt.NUnit2.Tasks.NUnit2TestDomain.RunTest(String testcase, String assembl

yFile, String configFilePath, EventListener listener)

   at NAnt.NUnit2.Tasks.NUnit2Task.RunSingleRemoteTest(NUnit2Test test, String t

estAssembly, EventListener listener)

 

 

[Core.Project:Build failed.  - [] <>]

Exception: NAnt.Core.BuildException

Message: NUnit 2.0 Error:

Source: NAnt.NUnit2Tasks

   at NAnt.NUnit2.Tasks.NUnit2Task.RunSingleRemoteTest(NUnit2Test test, String t

estAssembly, EventListener listener)

   at NAnt.NUnit2.Tasks.NUnit2Task.RunRemoteTest(NUnit2Test test, EventListener

listener)

   at NAnt.NUnit2.Tasks.NUnit2Task.ExecuteTask()

   at NAnt.Core.Task.Execute()

   at NAnt.Core.Target.Execute()

   at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)

   at NAnt.Core.Project.Execute()

   at NAnt.Core.Project.Run()

 

Nested Exception

 

Exception: System.IO.FileNotFoundException

Message: File or assembly name nunit.framework, or one of its dependencies, was

not found.

Source: mscorlib

 

Server stack trace:

   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, B

oolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Ass

embly locationHint, StackCrawlMark& stackMark)

   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean

stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)

   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence as

semblySecurity, StackCrawlMark& stackMark)

   at System.Activator.CreateInstance(String assemblyName, String typeName, Bool

ean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureI

nfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMar

k& stackMark)

   at System.Activator.CreateInstance(String assemblyName, String typeName, Bool

ean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureI

nfo culture, Object[] activationAttributes, Evidence securityInfo)

   at System.AppDomain.CreateInstance(String assemblyName, String typeName, Bool

ean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureI

nfo culture, Object[] activationAttributes, Evidence securityAttributes)

   at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(M

ethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInC

ontext, Object[]& outArgs)

   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMes

sage msg, Int32 methodPtr, Boolean fExecuteInContext)

 

Exception rethrown at [0]:

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req

Msg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa

ta, Int32 type)

   at System.AppDomain.CreateInstance(String assemblyName, String typeName, Bool

ean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureI

nfo culture, Object[] activationAttributes, Evidence securityAttributes)

   at NAnt.NUnit2.Tasks.NUnit2TestDomain.CreateTestRunner(AppDomain domain)

   at NAnt.NUnit2.Tasks.NUnit2TestDomain.RunTest(String testcase, String assembl

yFile, String configFilePath, EventListener listener)

   at NAnt.NUnit2.Tasks.NUnit2Task.RunSingleRemoteTest(NUnit2Test test, String t

estAssembly, EventListener listener)

 

 

 

BUILD FAILED

 

NUnit 2.0 Error:

 File or assembly name nunit.framework, or one of its dependencies, was not foun

d.

 

Total time: 0.3 seconds.

 

Reply via email to