What the MSBuild & # 8594; operator does (arrow / dash greater than / - & gt;)?

What does the statement ->(or ->) do inside MSBuild?

Sample code from another question: File Tracking Log File

<!-- Appended tlog to track custom build events -->
<WriteLinesToFile
  File="$(IntDir)$(ProjectName).write.1.tlog"
  Lines="@(CustomBuildStep-&gt;'^%(Identity)');@(CustomBuildStep-&gt;MetaData('Outputs')-&gt;FullPath()-&gt;Distinct())"/>

Bonus question . What does @(CustomBuildStep-&gt;'^%(Identity)')the above code do?

+4
source share
1 answer

The operator ->in MSBuild is the conversion operator . It converts the list of elements into a new list of elements, substituting the line on the right side, using the metadata of the original elements.

->'^%(Identity)' batching. Identity - , "^". - %, WriteLinesToFile CustomBuildStep.

+7

Source: https://habr.com/ru/post/1619602/


All Articles