As you see in the Reproduction Steps there seems to be a bug where properties doesn’t get expanded in other properties that are marked as Multiline.
Is this known or intended behaviour?
I have traced it down to the file `BgScriptReader.cs` on line 890 https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Programs/AutomationTool/BuildGraph/BgScriptReader.cs\#L890
Here the line in the multiline property gets added to the StringBuilder without ever getting a call to ExpandProperties().
Since the other cases of parsing properties gets expanded I wonder if this is intended for any reason?
Or if this is a bug and we just need to add a ExpandProperties call to line 890 before sending the string into the StringBuilder?
Steps to Reproduce
Make a property in your build graph and set multiline to true and use a property from earlier.
Run this little snippet and you will notice that the file that gets written to disk will not have it’s property $(Data) expanded into “This has data to use”.
However if “ConfigToUseData” has Multiline set to false or not set at all, then the $(Data) property will be expanded as expected.
<Property Name="Data" Value="This has data to use" />
<Property Name="ConfigToUseData" Multiline="true">
{
DataFormatOfChoice = $(Data)
}
</Property>
<WriteTextFile File="$(ConfigLocation)" Append="false" Text="$(ConfigToUseData)" />
Hello Olle, thank you for the report. Yes this looks to be a bug and we will get it fixed.
Thank you
Matthew