diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
index 26d78479c72d8..8e58e09da35d3 100644
--- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
+++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
@@ -845,6 +845,7 @@
+
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RequiresLocationAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RequiresLocationAttribute.cs
new file mode 100644
index 0000000000000..f6af0d7afff23
--- /dev/null
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RequiresLocationAttribute.cs
@@ -0,0 +1,21 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.ComponentModel;
+
+namespace System.Runtime.CompilerServices
+{
+ ///
+ /// Reserved for use by a compiler for tracking metadata.
+ /// This attribute should not be used by developers in source code.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
+ public sealed class RequiresLocationAttribute : Attribute
+ {
+ /// Initializes the attribute.
+ public RequiresLocationAttribute()
+ {
+ }
+ }
+}
diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs
index 247730371d03f..900040db349ef 100644
--- a/src/libraries/System.Runtime/ref/System.Runtime.cs
+++ b/src/libraries/System.Runtime/ref/System.Runtime.cs
@@ -13046,6 +13046,12 @@ public sealed class RequiredMemberAttribute : System.Attribute
{
public RequiredMemberAttribute() { }
}
+ [System.AttributeUsageAttribute(System.AttributeTargets.Parameter, Inherited=false)]
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public sealed partial class RequiresLocationAttribute : System.Attribute
+ {
+ public RequiresLocationAttribute() { }
+ }
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly, AllowMultiple=false)]
public sealed partial class ReferenceAssemblyAttribute : System.Attribute
{
diff --git a/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/AttributesTests.cs b/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/AttributesTests.cs
index e190690254e03..6f58cc48e5bfb 100644
--- a/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/AttributesTests.cs
+++ b/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/AttributesTests.cs
@@ -393,5 +393,11 @@ public static void CompilerFeatureRequiredTests()
Assert.Equal("feature2", attr2.FeatureName);
Assert.True(attr2.IsOptional);
}
+
+ [Fact]
+ public static void RequiresLocationAttributeTests()
+ {
+ new RequiresLocationAttribute();
+ }
}
}