MSBuild Filtering ItemGroup of files with condition

后端 未结 2 473
春和景丽
春和景丽 2021-01-27 04:12

This feels like it\'s so simple, but I cannot get it to work.

All I\'m trying to achieve is a filtered list of the embedded resources. I\'ve tried various approaches bu

2条回答
  •  一整个雨季
    2021-01-27 04:43

    The Condition Attribute must return a boolean, and it operates on each element of the itemgroup. You can access each element using %(Identity). Say you have some unfiltered itemgroup called UnfilteredItems, and you want to filter those into a group called MyFilteredItems, using some regex pattern.

    
      
     
    

提交回复
热议问题