This documentation is archived and is not being maintained.
WriteLinesToFile Task
Visual Studio 2008
Writes the paths of the specified items to the specified text file.
The following example uses the WriteLinesToFile task to write the paths of the items in the MyItems item collection to the file specified by the MyTextFile item collection.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<MyTextFile Include="Items.txt"/>
<MyItems Include="*.cs"/>
</ItemGroup>
<Target Name="WriteToFile">
<WriteLinesToFile
File="@(MyTextFile)"
Lines="@(MyItems)"
Overwrite="true"/>
</Target>
</Project>
Show: