다음을 통해 공유


IL2024: 사용자 지정 특성 주석 파일에 동일한 메서드 매개 변수에 대해 지정된 값이 두 개 이상 있음

원인

하나의 메서드 매개 변수에 지정된 값 요소가 두 개 이상 있습니다. 각 메서드 매개 변수에 지정된 값은 하나만 있을 수 있습니다.

규칙 설명

사용자 지정 특성 주석 파일은 지정된 항목에 특정 특성이 있는 것처럼 동작하도록 트리머에 지시하는 데 사용됩니다. 특성 주석은 트리머 동작에 영향을 미치는 특성을 추가하는 데만 사용할 수 있으며, 다른 모든 특성은 무시됩니다. 특성 주석을 통해 추가된 특성은 트리머 동작에만 영향을 주며 출력 어셈블리에 추가되지 않습니다.

지정된 method에 동일한 name 값을 가진 parameter 요소가 두 개 이상 있습니다. parameter의 모든 특성은 단일 요소에 배치해야 합니다.

예제

<!-- 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>