diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/RequiresDynamicCodeAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/RequiresDynamicCodeAttribute.cs
index f6037d8660ba04..fa36f95c0527c6 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/RequiresDynamicCodeAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/RequiresDynamicCodeAttribute.cs
@@ -30,6 +30,11 @@ public RequiresDynamicCodeAttribute(string message)
Message = message;
}
+ ///
+ /// When set to true, indicates that the annotation should not apply to static members.
+ ///
+ public bool ExcludeStatics { get; set; }
+
///
/// Gets a message that contains information about the usage of dynamic code.
///
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/RequiresUnreferencedCodeAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/RequiresUnreferencedCodeAttribute.cs
index d063603281fd73..327425ca3362f7 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/RequiresUnreferencedCodeAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/RequiresUnreferencedCodeAttribute.cs
@@ -31,6 +31,11 @@ public RequiresUnreferencedCodeAttribute(string message)
Message = message;
}
+ ///
+ /// When set to true, indicates that the annotation should not apply to static members.
+ ///
+ public bool ExcludeStatics { get; set; }
+
///
/// Gets a message that contains information about the usage of unreferenced code.
///
diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs
index 4b9cb165e24850..7b66713a9e4838 100644
--- a/src/libraries/System.Runtime/ref/System.Runtime.cs
+++ b/src/libraries/System.Runtime/ref/System.Runtime.cs
@@ -9029,6 +9029,7 @@ public RequiresAssemblyFilesAttribute(string message) { }
public sealed partial class RequiresDynamicCodeAttribute : System.Attribute
{
public RequiresDynamicCodeAttribute(string message) { }
+ public bool ExcludeStatics { get; set; }
public string Message { get { throw null; } }
public string? Url { get { throw null; } set { } }
}
@@ -9036,6 +9037,7 @@ public RequiresDynamicCodeAttribute(string message) { }
public sealed partial class RequiresUnreferencedCodeAttribute : System.Attribute
{
public RequiresUnreferencedCodeAttribute(string message) { }
+ public bool ExcludeStatics { get; set; }
public string Message { get { throw null; } }
public string? Url { get { throw null; } set { } }
}