I’m using ILLink.Substitutions.xml to create a assembly library trimmable.
This would be example code.
namespace NSpace;
public static NClass
{
public static void NGenericMethod<TGeneric>(Boolean condition1, Boolean condition2, TGeneric value, String name) where TGeneric : unmanaged, IEqualityOperators<TGeneric, TGeneric, Boolean> {
// Body
}
}
This would be ILLink.Substitutions.xml example:
<?xml version="1.0" encoding="utf-8"?>
<linker>
<assembly fullname="NAssembly">
<type fullname="NSpace.NClass" feature="NAssembly.EnableFeature" featurevalue="false">
<method signature="System.Void NGenericMethod`1(System.Boolean,System.Boolean,!0,System.String)" body="stub">
</assembly>
</type>
</linker>
But I’m getting warning IL2009: Could not find method 'System.Void NGenericMethod`1(System.Boolean,System.Boolean,!0,System.String)' on type 'NClass.NClass'.
I expect get no warning and method body substitution.