views:

148

answers:

3

We are looking at using NAnt as a deployment tool for our internal (usually web based) applications.

One of our (many) current solutions uses colored output on the commandline to indicate if there was a problem with the installation (green and red).

Is there an easy way to change the output to be a particular color when NAnt is executing.

If there is no easy way, I'd be interested in hearing good ways.

A: 

Have you looked at the NAnt Tool: ColorNAnt (direct link)?

JeffH
I saw it in the list but I wasn't interested in running PERL... looking through it tho.
Jeff Martin
+1  A: 

I haven't tried this yet, but the following link looks promising:

Colorized-NAnt-Console-Output

Jeff Sargent
Of course, that requires patching and building the Nant source.
JeffH
I like it. I will have to try it. It would be nice if it could just compile to a separate DLL that could be dropped in to a standard NAnt install, and then the logger made available via configuration.
Jeff Martin
+1  A: 

We ended up making a custom task called colorecho which works the same as the echo task but let us color the output it makes.

Jeff Martin
are you able to tell us how you did that at all? I'm looking to do a simialr thing.
RodH257
Ditto, please share.
Christopher Stott