Hi Listers, 

We're building a project that needs to compile on both Mono (Linux) and
.net (win32), so we are unifing the build process using NAnt.

NAnt works great for compiling. And I would like to intergrate Unittests
into the BuildProcess using NUnit2. 

However, when running from NAnt two or more nunit2 tasks nant reports an
unhandled exceptions (pasted below). Sometimes NAnt reports internal
Errors (also below)

Currently, I am using mono 1.0.4 with Nant 0.85rc1.
The code that generates the error lives at:
http://devel.humano2.org/svn/h2/core/trunk/ with subversion revision 39.

I don't know if it's my use of NAnt, NUnit2 or something else is to
blame for the problems... I am relatively new to these tools...

Below are the Pastes from Console with the errors:

Unhandled Exception: System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation. --->
System.NullReferenceException: Object reference not set to an instance
of an object
in (unmanaged) (wrapper managed-to-native)
System.Reflection.MonoMethod:InternalInvoke (object,object[])
in <0x00004> (wrapper managed-to-native)
System.Reflection.MonoMethod:InternalInvoke (object,object[])
in <0x00097> System.Reflection.MonoMethod:Invoke
(object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
--- End of inner exception stack trace ---

in <0x000fb> System.Reflection.MonoMethod:Invoke
(object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
in <0x00021> System.Reflection.MethodBase:Invoke (object,object[])
in <0x0034b> HelperArguments:CallConsoleRunner ()
in <0x00053> (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void ()
in <0x00025> System.AppDomain:DoCallBack (System.CrossAppDomainDelegate)
in <0x00056> (wrapper remoting-invoke-with-check)
System.AppDomain:DoCallBack (System.CrossAppDomainDelegate)
in <0x00a48> NAnt.Console.ConsoleStub:Main (string[])



Sometimes NAnt reports Different errors Like this Internal Error, when
running the build:

$ nant /buildfile:core.build.xml 
Compat mode: the request from /home/marijn/share/nant/log4net.dll to
load System
 was remapped (http://www.go-mono.com/remap.html)
Compat mode: the request from /home/marijn/share/nant/log4net.dll to
load System
.Data was remapped (http://www.go-mono.com/remap.html)
Compat mode: the request from /home/marijn/share/nant/log4net.dll to
load System
.Web was remapped (http://www.go-mono.com/remap.html)
NAnt 0.85 (Build 0.85.1793.0; rc1; 11/28/2004)
Copyright (C) 2001-2004 Gerry Shaw
http://nant.sourceforge.net


Buildfile: file:///home/marijn/wd/workspace/core/core.build.xml
Target(s) specified: build 

  [sysinfo] Setting system information properties under sys.*

dlls:

      [csc] Compiling 1 files to
'/home/marijn/wd/workspace/core/bin/Humano2.Core.dll'.
      [csc] Compilation succeeded
      [csc] Compiling 2 files to
'/home/marijn/wd/workspace/core/bin/Humano2.Core.Db.dll'.
      [csc] Compilation succeeded
      [csc] Compiling 1 files to
'/home/marijn/wd/workspace/core/bin/Humano2.Core.Db.Pgsql.dll'.
      [csc] Compilation succeeded
      [csc] Compiling 1 files to
'/home/marijn/wd/workspace/core/bin/Humano2.Core.Db.Mssql.dll'.
      [csc] Compilation succeeded

testdlls:

      [csc] Compiling 1 files to
'/home/marijn/wd/workspace/core/bin/Humano2.Cor
e.Test.Config.dll'.
      [csc] Compilation succeeded

BUILD FAILED

INTERNAL ERROR

System.NullReferenceException: Object reference not set to an instance
of an obj
ect
in (unmanaged) (wrapper managed-to-native)
System.Reflection.Assembly:get_locati
on ()
in <0x00004> (wrapper managed-to-native)
System.Reflection.Assembly:get_location
 ()
in <0x00011> System.Reflection.Assembly:get_Location ()
in <0x00093> NAnt.Core.TaskBuilder:GetAssembly ()
in <0x0001a> NAnt.Core.TaskBuilder:CreateTask ()
in <0x0017d> NAnt.Core.TypeFactory:CreateTask
(System.Xml.XmlNode,NAnt.Core.Proj
ect)
in <0x00021> NAnt.Core.Project:CreateTask
(System.Xml.XmlNode,NAnt.Core.Target)
in <0x001f4> NAnt.Core.Target:Execute ()
in <0x000c4> NAnt.Core.Project:Execute (string,bool)
in <0x00241> NAnt.Core.Project:Execute ()
in <0x00168> NAnt.Core.Project:Run ()


Please send bug report to [EMAIL PROTECTED]


Hope this means something to someone..

Regards,
     Marijn.



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to