-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Description
The below code currently generates warnings for both RUC and RDC even though the user is only accessing the static method
using System;
using System.Diagnostics.CodeAnalysis;
public class Program
{
static void Main(string[] args)
{
Derived.D_Method();
}
}
public class Base
{
[RequiresDynamicCode("RDC")]
[RequiresUnreferencedCode("RUC")]
public Base() { }
}
public class Derived : Base
{
public static void D_Method() { }
}ILC: Trim analysis warning IL2026: Derived.Derived(): Using member 'Base.Base()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. RUC.
ILC: AOT analysis warning IL3050: Derived.Derived(): Using member 'Base.Base()' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. RDC.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status