Skip to content

ILLink rooting assemblies with forwarded types #99592

Closed as not planned
Closed as not planned
@kotlarmilos

Description

@kotlarmilos

Description

Rooting input assemblies is not enough when trimming with ILLinker forwarded types. It is required to root all forwarded assemblies as well.

Test case:

[Theory]
[InlineData("mscorlib")]
[InlineData("System.Threading.Overlapped")]
public static void ShimsHaveOnlyTypeForwards(string assemblyName)
{
    Assembly assembly = Assembly.Load(assemblyName);

    Assert.Empty(assembly.GetTypes());
    Assert.Empty(assembly.GetManifestResourceNames());
    Assert.NotEmpty(assembly.GetForwardedTypes());
}

Metadata

Metadata

Assignees

Labels

area-Tools-ILLink.NET linker development as well as trimming analyzersdisabled-testThe test is disabled in source code against the issueos-iosApple iOS

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions