Thanks you guys! ----- Original Message ----- From: "Jean Rajotte" <[EMAIL PROTECTED]>
> ... > the following works for me: > > > <!-- sadly, there needs to be this extra step for safety --> > <ifnot propertyexists="nant.tasks.nunit2" > > <property name="nant.tasks.nunit2" value="false" /> > </ifnot> > > <!-- main entry --> > <target name="test-task-presence" depends="run-when-nunit" > > <echo message="in main" /> > </target> > > <!-- conditional on task availability --> > <target if="${nant.tasks.nunit2}" name="run-when-nunit" > > <echo message="nunit is avail" /> > </target> > > > HTH > /jean > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of > > > > > > Rodrigo, targets can be conditionally executed with if/unless > > attributes: > > > > <call target="test" if="${somevalue}" /> > > <call target="test2" unless="${somevalue}"/> > > > > If/unless can be applied to any task, not just call. > > > > You can also use if/unless on the target itself: > > > > <target name="unitest" if="${nunit.present}"> > > ... > > </target> > > > > Damir ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users