RemoveDuplicates Task


For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see RemoveDuplicates Task on Removes duplicate items from the specified item collection.

The following table describes the parameters of the RemoveDuplicates task.

FilteredOptional ITaskItem[] output parameter.

Contains an item collection with all duplicate items removed.
InputsOptional ITaskItem[] parameter.

The item collection to remove duplicate items from.

This task is case insensitive and does not compare item metadata when determining duplicates.

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 RemoveDuplicates task to remove duplicate items from the MyItems item collection. When the task is complete, the FilteredItems item collection contains one item.

<Project xmlns="">  
        <MyItems Include="MyFile.cs"/>  
        <MyItems Include="MyFile.cs">  
        <MyItems Include="myfile.cs"/>  
    <Target Name="RemoveDuplicateItems">  

Task Reference
MSBuild Concepts