NAnt Frequently Asked Questions |
NAnt Frequently Asked Questions |
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:
NAnt.exe -t:net-1.0
<frameworks> <platform name="win32" default="net-1.0"> ... </platform> </frameworks>
nant.settings.currentframework
:
<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:
The "Common7\Packages\schemas\xml" subdirectory of your Visual Studio.NET installation.
Visual Studio 2005The "Xml\Schemas" subdirectory of your Visual Studio 2005 installation.