"each" does not evaluate variables when applying variable substitution

Hello,

I have enabled variable substitution in the Deploy NuGet package step and I have created these variables (simplified example):

Variable Value
GeneralName ABC
List[A].Name I am #{GeneralName}
List[B].Name I am not #{GeneralName}

Then in a config file I have the following:

<names>
  #{each item in List}
  <name>#{item.Name}</name>
  #{/name}
</names>

But the final result after substitution is:

<names>
  <name>I am #{GeneralName}</name>
  <name>I am not #{GeneralName}</name>
</names>

So far I have solved this but using extra variable substitutions and applying it twice to that file. But wondered if this is a known issue or a feature. My version is 3.1.4 :slight_smile:

Hi Boyan,

I apologize. Recursive substitution during iteration was broken. We resolved the issue in version 3.1.6 (your version is just a little too early).

Here is the issue. If you upgrade it should work as expected for you.

I hope that helps.

Regards,
Michael