NAnt IF task doesn't seem to work

Posted by goombaloon on Stack Overflow See other posts from Stack Overflow or by goombaloon
Published on 2011-01-26T13:20:00Z Indexed on 2012/07/06 15:16 UTC
Read the original article Hit count: 270

Filed under:

I'm trying the example from the NAnt documentation for the if task at:

http://nant.sourceforge.net/release/0.85/help/tasks/if.html

Specifically the following code...

<if test="${build.configuration='release'}">
    <echo>Build release configuration</echo>
</if>

where build.configuration has been defined beforehand as

<property name="build.configuration" value="debug" overwrite="false" />

When I run it using nant.exe (version 0.91.3881.0), I get the following error:

'}' expected
Expression: ${build.configuration='release'}
                                 ^

I'm guessing I'm missing something simple?

© Stack Overflow or respective owner

Related posts about nant