Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用空格而不是分号分隔msbuild ItemGroup项?_Msbuild - Fatal编程技术网

如何使用空格而不是分号分隔msbuild ItemGroup项?

如何使用空格而不是分号分隔msbuild ItemGroup项?,msbuild,Msbuild,观察msbuild脚本的以下部分: <ItemGroup> <R Include="-Microsoft.Design#CA1000" /> <R Include="-Microsoft.Design#CA1002" /> </ItemGroup> 但是,我不喜欢这样,因为实际上我有很多规则要禁用,我希望避免这样列出所有规则。要使用分号以外的字符分隔每个项目,请使用语法@(myType,'separator') <Propert

观察msbuild脚本的以下部分:

<ItemGroup>
  <R Include="-Microsoft.Design#CA1000" />
  <R Include="-Microsoft.Design#CA1002" />
</ItemGroup>

但是,我不喜欢这样,因为实际上我有很多规则要禁用,我希望避免这样列出所有规则。

要使用分号以外的字符分隔每个项目,请使用语法
@(myType,'separator')


<PropertyGroup>
  <R>/ruleid:-Microsoft.Design#CA1000 /ruleid:-Microsoft.Design#CA1002</R
</PropertyGroup>
<ItemGroup>
  <R Include="-Microsoft.Design#CA1000" />
  <R Include="-Microsoft.Design#CA1002" />
</ItemGroup>

<Target Name="FxcopRulesFlattening">
  <!-- Using the syntax @(ItemName, 'Separator')-->
  <Message Text="@(R -> '/ruleid:%(Identity)', ' ')"/>
</Target>