Hi Bart,
are you using the latest nightly build ?
with it you should be able to test with
<task if="${myproperty=='value'}">
...
</task>
http://nant.sourceforge.net/nightly/help/fundamentals/expressions.html#numeric-operators
Thibaut
On Fri, 15 Oct 2004 14:56:57 +0100, Bart Read <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
>
> I'm afraid I'm scratching my head a bit with this one. I want to use a
> boolean check (if or unless, and sometimes the if task) to conditionally
> execute a task based on the value of a property.
>
> So I want to be able to do something like:
>
> <sometask if="${propertyName}=string_value"/>
>
> etc.
>
> I've tried about half a dozen ways of writing this and every time I get a
> build error saying something like the following:
>
> Cannot resolve expanded value '"4"=="UNKNOWN BUILD NUMBER"' of 'unless'
> attribute to a Boolean value.
>
> (derived from unless=""${label-to-apply}"=="UNKNOWN BUILD
> NUMBER"")
>
> I've read the documentation but unfortunately it's fairly opaque on this
> point. I've tried using single-quotes, double quotes (as "), no quotes,
> single equals, double-equals etc in various combinations but all to no
> avail. This is seriously driving me up the wall at the moment.
>
> Anybody know anything about this? I'd be very grateful for any assistance.
>
>
> Many thanks,
> Bart
>
>
>
> ======================
> Bart Read
> Software Engineer
> Red Gate Software Ltd
> +44 (0) 870 160 0037 ext 31
> ======================
>
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users