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:


    
          ...
         
              
                    C:\Program Files\nant-0.85\bin\NAnt.exe
                    F:\Build\BabelFish2.0\WorkingFolder
                    -D:param1=somevalue -D:param2="some other value"
                    true
                    Source/Build/Build.nant
                   
                         default
                   

                    2400
              

         

          ...
    

The target NAnt script need only reference the properties as follows:


 
   

 

image