MSBuild: Excluding objects if %(Filename) matches any in ItemGroup
Given a target:
that receives
I can remove
and then attempted to amend the comparison:
and also attempted to directly
but neither approach was successful. I'm struggling to follow how and when MSBuild expands
that receives
FilesAsBundle as the following input (abridged for simplicity):I can remove
TerraFX.Interop.Windows.dll from the list. But I have a need to match any of several filenames. I naively define a ItemGroup of DepsToExclude as such:and then attempted to amend the comparison:
and also attempted to directly
Remove from FilesToBundle as follows:but neither approach was successful. I'm struggling to follow how and when MSBuild expands
@ to automatically cover all elements in a group. What would be the correct way to express this?