Posts Tagged ‘CI’

NAnt Overriding properties from the console

May 13, 2010 Leave a comment

If you have a property in your project which may change depending on a commandline switch you can override it using the -D:name=value commandline switch.

I the sample below I am overriding the property from the commandline.

<?xml version="1.0" encoding="utf-8"?>
<project name="nantexamples" default="cli-property-overrides" xmlns="">
	<property name="mode" value="default"/>
	<target name="cli-property-overrides">
		<echo message="The value of mode is ${mode}" />

[/Users/blairdavidson/Projects/NantExamples] nant -D:mode=cli-value
NAnt 0.86 (Build 0.86.2898.0; beta1; 8/12/2007)
Copyright (C) 2001-2007 Gerry Shaw

Buildfile: file:///Users/blairdavidson/Projects/NantExamples/
Target framework: Mono 2.0 Profile
Target(s) specified: cli-property-overrides

[property] Read-only property “mode” cannot be overwritten.


[echo] The value of mode is cli-value

BUILD SUCCEEDED – 0 non-fatal error(s), 1 warning(s)

Total time: 0 seconds.


Categories: Development Tags: , , , , , ,

NAnt OS X Build Issues

May 13, 2010 Leave a comment

If you have errors with getting nant build scripts working with mono on Mac OS X add the following to your bashrc file.
export PATH=$PATH:/Library/Frameworks/Mono.framework/Commands/

This will address the following issue:
Expression: ${not pkg-config::exists(’mono’)}

‘pkg-config’ failed to start.


Categories: Development Tags: , , , ,

Is NAnt Dead?

March 12, 2010 Leave a comment
Categories: Development Tags: , , ,