I haven't seen something like that in the custom task pack.
You could cheat by using ReadLinesFromFile
and WriteLinesToFile
:
<PropertyGroup>
<LogFile>log.txt</LogFile>
</PropertyGroup>
<ItemGroup>
<Log Include="Line1"/>
<Log Include="Line2"/>
</ItemGroup>
<Target Name="WriteFromStart">
<ReadLinesFromFile File="$(LogFile)" Condition="Exists('log.txt')">
<Output TaskParameter="Lines" ItemName="Log"/>
</ReadLinesFromFile>
<WriteLinesToFile File="$(LogFile)"
Lines="@(Log)"
Condition="@(Log) != '' And (@(Log) != '\r\n' Or @(Log) != '\n')"
Overwrite="true">
</WriteLinesToFile>
</Target>
Or you could create a custom task.