IL2015: Invalid value for field substitution

Cause

The value used in a substitution file for replacing a field's value does not represent a value of a built-in type or does not match the type of the field.

Rule description

Substitution files are used to instruct the trimmer to replace specific method bodies with either a throw or return constant statements.

The value passed to the value argument of a field element could not be converted by the trimmer to a type matching the return type of the specified field.

Example

<!-- IL2015: Invalid value 'NonNumber' for 'MyType.IntField' -->
<linker>
  <assembly fullname="MyAssembly">
    <type fullname="MyType">
      <field name="IntField" value="NonNumber" />
    </type>
  </assembly>
</linker>