Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

ReadLinesFromFile Task

Reads a list of items from a text file.

The following table describes the parameters of the ReadLinesFromFile task.




Required ITaskItem parameter.

Specifies the file to read. The file must have one item on each line.


Optional ITaskItem[] output parameter.

Contains the lines read from the file.

In addition to the parameters listed above, this task inherits parameters from the TaskExtension class, which itself inherits from the Task class. For a list of these additional parameters and their descriptions, see TaskExtension Base Class.

The following example uses the ReadLinesFromFile task to create items from a list in a text file. The items read from the file are stored in the ItemsFromFile item collection.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

        <MyTextFile Include="Items.txt"/>

    <Target Name="ReadFromFile">
            File="@(MyTextFile)" >

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.