I have a NAnt script like below:
<if test="${a}>${b}">
<call target="target"/>
</if>
What I want is to convert it into MSBuild script.
I found that there is tag to write conditions but it is only used for defining property/item.
Can we write ‘if’ condition in MSBuild?
Please help!
Every msbuild task have an optional Condition parameter so you could do this:
Edit: If you need a condition to execute multiple task, you could repeat the Condition parameter foreach task or you could encapsulate the multiple task call in a target
(The characters < and > must be escaped)