diff --git a/eng/pipelines/runtime-extra-platforms-other.yml b/eng/pipelines/runtime-extra-platforms-other.yml
index e25d3c86aa71c7..16ffc6af669a31 100644
--- a/eng/pipelines/runtime-extra-platforms-other.yml
+++ b/eng/pipelines/runtime-extra-platforms-other.yml
@@ -85,6 +85,7 @@ jobs:
- windows_x64
- windows_arm64
- Linux_x64
+ - Linux_arm64
jobParameters:
testGroup: innerloop
isSingleFile: true
diff --git a/src/libraries/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.cs b/src/libraries/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.cs
index 82e762d95f67f8..07bf6ea97b17cd 100644
--- a/src/libraries/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.cs
+++ b/src/libraries/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.cs
@@ -9,6 +9,7 @@ namespace System.Reflection
public abstract partial class DispatchProxy
{
protected DispatchProxy() { }
+ [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("Creating a proxy instance requires generating code at runtime")]
public static T Create<[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] T, [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TProxy>() where TProxy : System.Reflection.DispatchProxy { throw null; }
protected abstract object? Invoke(System.Reflection.MethodInfo? targetMethod, object?[]? args);
}
diff --git a/src/libraries/System.Reflection.DispatchProxy/src/System.Reflection.DispatchProxy.csproj b/src/libraries/System.Reflection.DispatchProxy/src/System.Reflection.DispatchProxy.csproj
index 45608a80899daa..231c1b9241d966 100644
--- a/src/libraries/System.Reflection.DispatchProxy/src/System.Reflection.DispatchProxy.csproj
+++ b/src/libraries/System.Reflection.DispatchProxy/src/System.Reflection.DispatchProxy.csproj
@@ -2,6 +2,7 @@
true
$(NetCoreAppCurrent)
+ true
diff --git a/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxy.cs b/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxy.cs
index dbfea73eebfc24..9a971cb6bc86c9 100644
--- a/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxy.cs
+++ b/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxy.cs
@@ -33,6 +33,7 @@ protected DispatchProxy()
/// An object instance that implements .
/// is a class,
/// or is sealed or does not have a parameterless constructor
+ [RequiresDynamicCode("Creating a proxy instance requires generating code at runtime")]
public static T Create<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TProxy>()
where TProxy : DispatchProxy
{
diff --git a/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs b/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs
index c779ad02440656..2f496aada8b3ce 100644
--- a/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs
+++ b/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs
@@ -59,6 +59,7 @@ private static MethodInfo GetGenericMethodMethodInfo() =>
typeof(MethodInfo).GetMethod("MakeGenericMethod", new Type[] { typeof(Type[]) })!;
// Returns a new instance of a proxy the derives from 'baseType' and implements 'interfaceType'
+ [RequiresDynamicCode("Defining a dynamic assembly requires generating code at runtime")]
internal static object CreateProxyInstance(
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type baseType,
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType)
@@ -113,6 +114,7 @@ private sealed class ProxyAssembly
private readonly HashSet _ignoresAccessAssemblyNames = new HashSet();
private ConstructorInfo? _ignoresAccessChecksToAttributeConstructor;
+ [RequiresDynamicCode("Defining a dynamic assembly requires generating code at runtime")]
public ProxyAssembly(AssemblyLoadContext alc)
{
string name;
diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj
index 340116853154ce..3e6dcac32688ee 100644
--- a/src/libraries/tests.proj
+++ b/src/libraries/tests.proj
@@ -447,6 +447,10 @@
Condition="'$(TargetOS)' == 'linux'" />
+
+