Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Normalizing a list of items in MSBuild

Tags:

I am trying to get a list of all unit test assemblies under the root of my project. I can do this as follows:

<CreateItem Include="**\bin\**\*.UnitTest.*.dll">
   <Output TaskParameter="Include" ItemName="Items"/>
</CreateItem>

However, this will find the same DLLs multiple times since they exist in multiple sub-directories. Is there an easy way for me to normalize based on item metadata (ie. the file name and extension) so that I get a list of unique unit test DLLs? Or do I have to resort to writing my own task?