IL2024: There is more than one value specified for the same method parameter in a custom attribute annotations file

Cause

A method parameter has more than one value element specified. There can only be one value specified for each method parameter.

Rule description

Custom attribute annotation files are used to instruct the trimmer to behave as if the specified item has a given attribute. Attribute annotations can only be used to add attributes which have effect on the trimmer behavior, all other attributes will be ignored. Attributes added via attribute annotations only influence the trimmer behavior and they are never added to the output assembly.

There is more than one parameter element with the same name value in a given method. All attributes on a parameter should be put in a single element.

Example

<!-- IL2024: More than one value specified for parameter 'parameter' of method 'method' -->
<linker>
  <assembly fullname="MyAssembly">
    <type fullname="MyType">
      <method name="MyMethod">
        <parameter name="methodParameter">
          <attribute fullname="FirstAttribute"/>
        </parameter>
        <parameter name="methodParameter">
          <attribute fullname="SecondAttribute"/>
        </parameter>
      </method>
    </type>
  </assembly>
</linker>