There are currently some regressions in Mono CVS (bug #55996) with regards to AppDomain unloading which cause a NullReferenceException when building NAnt.
Zoltan Varga implemented a workaround for this issue: set the environment variable
MONO_NO_UNLOAD to any value before running NAnt:
$ export MONO_NO_UNLOAD=1 $ make clean $ make $ mono bin/NAnt.exe clean build
NAnt cannot be built using VS.NET, as VS.NET (prior to VS.NET 2005) is unable to handle dependencies between projects very well.
However, you can compile NAnt using the NAnt build scripts, and then debug NAnt using VS.NET. To do this, open the NAnt solution file in VS.NET and change the following debugging properties of the NAnt.Console project (using Project -> Properties -> Configuration Properties -> Debugging):
Finally, just run NAnt in VS.NET (using Debug -> Start or just F5), and when VS.NET informs you that there were build errors, and asks whether you still want to continue : select Yes.
As from NAnt 0.85, NAnt by default targets the framework on which its running.
NAnt supports three ways for changing the target framework:
From the command line, using the -t[argetframework] argument:
By changing the default target framework in the NAnt configuration file:
<frameworks> <platform name="win32" default="net-1.0"> ... </platform> </frameworks>
By changing the value of the system property
<property name="nant.settings.currentframework" value="net-1.0" />
Copy the schema for your version of NAnt from the schema folder in the NAnt distribution to:
Last edited by rmboggs,