有没有一种方法可以删除ItemGroup的内容,而不需要使用目标? 我正在寻找等价于以下内容的东西:
感谢您的选择。
<ItemGroup>
<MyItemGroup Remove="@(MyItemGroup)"/>
</ItemGroup>
感谢您的选择。
<Target>
<ItemGroup>
<Compile Remove="*.config"/>
</ItemGroup>
</Target>
XmlPeek
任务的Result
输出参数(https://msdn.microsoft.com/en-us/library/ff598684.aspx)。此外,即使对于表示文件的项目,有时也适当使用`Remove`而不查询文件系统;例如,在`Microsoft.Common.CurrentVersion.targets`中的这些行:https://github.com/Microsoft/msbuild/blob/f98d5d96efe032b8990e3c3b404ab2dbd5d6b043/src/Tasks/Microsoft.Common.CurrentVersion.targets#L2978-L2982 - weir