Re: [NAnt-users] Using "if" to test for existence of properties

2010-04-13 Thread Bob Archer
You can just use the overwrite attribute also. We use this also to specify a default setting mostly for properties that will be set from the command line. debug mode for example. BOb From: Christopher Brandt [mailto:xtopher.bra...@gmail.com] Sent: Tuesday, April 13, 2010 11:55 AM To: NAnt

Re: [NAnt-users] Using "if" to test for existence of properties

2010-04-13 Thread Christopher Brandt
Same strategy here; ensure the property exists and then use the if attribute to test its value. One place where you can use the if / unless attributes to test existence is in setting the property itself, so giving it a default value. We use the following to ensure that required properties are at le

Re: [NAnt-users] Using "if" to test for existence of properties

2010-04-13 Thread Pento, Michael
Hello, Maybe I am missing something here, but, I tried this using the following: This executed without failure, but, I did not define "MyProperty" at all, so, I added this to the above, outside of the target that

Re: [NAnt-users] Using "if" to test for existence of properties

2010-04-13 Thread Bob Archer
I think I have run into this before. I think the easiest fix is to make sure the property always exists. Then you can check to see if it is not empty. BOb From: Durand Van Arnem [mailto:duran...@hotmail.com] Sent: Tuesday, April 13, 2010 10:33 AM To: NAnt Users Subject: [NAnt-users] Using "if"

[NAnt-users] Using "if" to test for existence of properties

2010-04-13 Thread Durand Van Arnem
Hello, I could use some advice about how to handle this situation: I have a property, MyProperty, that may or may not be set. I want a task to execute if the property is set, e.g. If MyProperty is not set, this task fails because NAnt appears to evaluate the message portion regard