Title: Message
Just to be clear, your are doing this because you want the build script you are called to modify the properties (specified by passbyref) and have the calling build script use those changes?
 
What is the practical application for this?
 
Is this example correct?
 
--file1.build--
<project>
    <property name="prop" value="1"/>
    <nant buildfile="file2.build" target="alterProp" passbyref="prop" inheritall="true"/>
    <echo message="Prop: ${prop}/>
</>
 
--file2.build--
<project>
    <target name="alterProp">
        <property name="prop" value="2"/>
    </>
</>
 
Running this you would get the output of "Prop: 2"?
 
----- Original Message -----
Sent: Tuesday, December 30, 2003 11:14 AM
Subject: [nant-dev] NAnt task "passbyref" extension

Our development group has implemented a "passbyref" extension to the NAnt task, which essentially allows the task to modify selected property values, and have those modified property values available to the calling client. This is comparable to passing parameters by reference in C# code. A snippet from a build file looks like:

<nant target="debug" inheritall="true" passbyref="foo bar"/>

<!-- Use modified foo and bar properties. -->

If this capability is suitable for inclusion in the standard Nant task, we can send in a patch for more detailed review.

Randy

Reply via email to