.net – NAnt task that will display all property name / values


Is there a NAnt task that will echo out all property names and values that are currently set during a build? Something equivalent to the Ant echoproperties task maybe?

Best Solution

Try this snippet:

    <property name="foo" value="bar"/>
    <property name="fiz" value="buz"/>

    <script language="C#" prefix="util" >
            public static void ScriptMain(Project project) 
                foreach (DictionaryEntry entry in project.Properties)
                    Console.WriteLine("{0}={1}", entry.Key, entry.Value);

You can just save and run with nant.

And no, there isn't a task or function to do this for you already.