Suppose I have a bunch of files in a folder:
foo.test.txt
bar.txt
...
And I want to create an ItemGroup to exclude files containing ".test." somewhere in the title, how would I do that in MSBuild?
<!-- Can't change this part -->
<Items Include="*.txt" />
<CreateItem Include="@(Items)" Condition="'%(Items.Exclude)'!='true' AND (???)">
<Output TaskParameter="Include" ItemName="ItemsToProcess"/>
</CreateItem>
Where the ??? should be something like:
!Contains(%(Items), ".test.")
Except that I don't know how to do that in MSBuild.