I'm trying to understand some MSBuild concept (I'm familiar with NAnt).
I try to initialise some property in a target and then used it in another. Here is an example:
<propertygroup>
<MyProp>X</MyProp>
</propertygroup>
<target name="Main">
<message text="$(MyProp)"/> <!-- Display 'X' -->
<CallTarget Target="Sub">
<Output TaskParameter="localProp" PropertyName="MyProp"/>
</CallTarget>
<message text="$(MyProp)"/> <!-- should display 'Y' -->
</target>
<target name="Sub" Outputs=$(localProp)>
<propertygroup>
<localProp>Y</localProp>
</propertygroup>
</target>
And it of course does not work.