Figured out the answer to my own question. Have to assign the variable to an
intermediate one. Working snippet:

<property name="intermediate" value="${nant.project.basedir}" />
<nant
    buildfile="..\..\..\common-build-files\modify.file.build"
    target="source.reformat">
        <properties>
                <property
                        name="parameter.directory"
                        value="${intermediate}\MySource.cs" />
        </properties>
</nant>

Nick
http://www.varacalli.com

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick Varacalli
Sent: Wednesday, January 07, 2004 23:38
To: [EMAIL PROTECTED]
Subject: [Nant-users] <nant> and <properties> help needed.


I'm trying to pass a property to a build file invoked by the nant task.

<nant buildfile="..\..\..\common-build-files\modify.file.build"
target="source.reformat">
        <properties>
                <property
                        name="parameter.directory"
                        value="${nant.project.basedir}\MySource.cs" />
        </properties>
</nant>

I want to pass in the full path to MySource.cs, which is in the directory of
the current build file. The problem is, as the help on the <nant> task
plainly states, "value" is NOT expanded by default, so
${nant.project.basedir} is passed TEXTUALLY to the called build file, which
proceeds to expand the variable to its OWN basedir. Is there a way to force
the value to be expanded in the current build file? If not, any suggestions
for a work-around for this?

Running NAnt 0.84, .Net Framework 1.1.

Nick Varacalli
http://www.varacalli.com



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users





-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to