-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Labels
Milestone
Description
using System;
using System.Diagnostics.CodeAnalysis;
typeof(C).GetProperties().Select(p => p.GetCustomAttributes(false));
class C
{
[MyAttribute(typeof(Annotated))]
public int Property { get; set; }
}
class MyAttribute : Attribute
{
public MyAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type type)
{
}
}
[RequiresUnreferencedCode("Annotated")]
class Annotated
{
public static void Method() { }
}ILLink Analyzer:
Program.cs(8,6): warning IL2026: Using member 'Annotated.Method()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Annotated.
ILLink:
ILLink : Trim analysis warning IL2026: C.Property: Using member 'Annotated.Method()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Annotated.
ILC:
ILC : Trim analysis warning IL2026: C.Property: Using member 'Annotated.Method()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Annotated.
ILC : Trim analysis warning IL2026: C.Property: Using member 'Annotated.Method()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Annotated.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status