The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ReadLinesFromFile Task

Reads a list of items from a text file.

The following table describes the parameters of the ReadLinesFromFile task.

Parameter Description


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.

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="">

        <MyTextFile Include="Items.txt"/>

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft