How to convert if condition to NAnt in MSBuild?
1 answer
Each msbuild task has an optional Condition parameter so you can do this:
<CallTarget Targets="target" Condition="${a} > ${b}"/>
Change: . If you need a condition to perform several tasks, you can repeat the Foreach condition parameter or you can encapsulate the call of several tasks in the target
<Target Name="MultipleCall" Condition="${a} > ${b}">
<CallTarget Targets="targetA"/>
<CallTarget Targets="targetB"/>
</Target>
(The <and> characters must be escaped)
+5