I have an MSBuild script with a defined Target
and ItemGroup
.
Inside the target, i define a PropertyGroup like so:
<PropertyGroup>
<StartedMessage>##teamcity[testStarted name='%(Names.Identity)']</StartedMessage>
<FinishedMessage>##teamcity[testFinished name='%(Names.Identity)']</FinishedMessage>
<TestStatus>testPassed</TestStatus>
</PropertyGroup>
The problem is, that these properties seem to be evaluated only once (when the target is called), and so do not reflect the correct value (Identity metadata) of the item that i'm iterating.
Is there any way to delay (lazy) evaluate the properties during execution?
Or what is the proper way of defining "dynamic" properties that need to change when iterating an ItemGroup
?