Passing parameters to a NAnt script from CruiseControl.NET is pretty simple. Basically you pass name/value pairs with the -D command line argument in the buildArgs element. Values with spaces need to be wrapped with double quotes. The following CC.NET configuration file illustrates this:
<cruisecontrol>
<project>
...
<tasks>
<nant>
<executable>C:\Program Files\nant-0.85\bin\NAnt.exe</executable>
<baseDirectory>F:\Build\BabelFish2.0\WorkingFolder</baseDirectory>
<buildArgs>-D:param1=somevalue -D:param2="some other value"</buildArgs>
<nologo>true</nologo>
<buildFile>Source/Build/Build.nant</buildFile>
<targetList>
<target>default</target>
</targetList>
<buildTimeoutSeconds>2400</buildTimeoutSeconds>
</nant>
</tasks>
...
</project>
</cruisecontrol>
The target NAnt script need only reference the properties as follows:
<project name="YadaYadaYada" default="default">
<target name="default">
<echo message="Param 1=${param1}, Param 2=${param2}"/>
</target>
</project>
