Calling nAnt functions with parameters?

  • Thread starter Thread starter Peter Rilling
  • Start date Start date
P

Peter Rilling

I have the following nAnt task which does not work. The problem is that I
an calling is-assembly(...) passing in as a parameter a dynamically
property. This property is not known until runtime. I get the error
"Unexpected token 'Dollar'". How can I call functions that take parameters
in a dynamic fashion?

<copy file="${filename}"
todir="${TempFolderName}"
if="${file::is-assembly(${filename})}"/>
 
Never mind. I figured it out.

Turns out you just use the property's name when calling a function, you
don't have to qualify it with $(.

So this works,

<copy file="${filename}"
todir="${TempFolderName}"
if="${file::is-assembly(filename)}"/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top