diff --git a/docs/workflow/trimming/feature-switches.md b/docs/workflow/trimming/feature-switches.md
index 46e7452fad2c5..40a168d7c25bc 100644
--- a/docs/workflow/trimming/feature-switches.md
+++ b/docs/workflow/trimming/feature-switches.md
@@ -29,7 +29,6 @@ configurations but their defaults might vary as any SDK can set the defaults dif
| _EnableConsumingManagedCodeFromNativeHosting | System.Runtime.InteropServices.EnableConsumingManagedCodeFromNativeHosting | Getting a managed function from native hosting is disabled when set to false and related functionality can be trimmed. |
| VerifyDependencyInjectionOpenGenericServiceTrimmability | Microsoft.Extensions.DependencyInjection.VerifyOpenGenericServiceTrimmability | When set to true, DependencyInjection will verify trimming annotations applied to open generic services are correct |
| DisableDependencyInjectionDynamicEngine | Microsoft.Extensions.DependencyInjection.DisableDynamicEngine | When set to true, DependencyInjection will avoid using System.Reflection.Emit when realizing services |
-| NullabilityInfoContextSupport | System.Reflection.NullabilityInfoContext.IsSupported | Nullable attributes can be trimmed when set to false |
| DynamicCodeSupport | System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeSupported | Changes RuntimeFeature.IsDynamicCodeSupported to false to allow testing AOT-safe fallback code without publishing for Native AOT. |
| _AggressiveAttributeTrimming | System.AggressiveAttributeTrimming | When set to true, aggressively trims attributes to allow for the most size savings possible, even if it could result in runtime behavior changes |
| JsonSerializerIsReflectionEnabledByDefault | System.Text.Json.JsonSerializer.IsReflectionEnabledByDefault | When set to false, disables using reflection as the default contract resolver in System.Text.Json |
diff --git a/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml
index 7706dd2ce18fe..db98894014bc5 100644
--- a/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml
+++ b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml
@@ -57,37 +57,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.Shared.xml b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.Shared.xml
index 4ddeabcb227f1..465c0d5f87b37 100644
--- a/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.Shared.xml
+++ b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.Shared.xml
@@ -36,9 +36,6 @@
-
-
-
diff --git a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
index 1f1669a04359c..bb7058f936c7c 100644
--- a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
+++ b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
@@ -4058,9 +4058,6 @@
Unable to properly load any time zone data files.
-
- NullabilityInfoContext is not supported in the current application because 'System.Reflection.NullabilityInfoContext.IsSupported' is set to false. Set the MSBuild Property 'NullabilityInfoContextSupport' to true in order to enable it.
-
Thread is running or terminated; it cannot restart.
diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/NullabilityInfoContext.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/NullabilityInfoContext.cs
index 5c56ef2519759..fd279a70fbbb6 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Reflection/NullabilityInfoContext.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/NullabilityInfoContext.cs
@@ -22,9 +22,6 @@ sealed class NullabilityInfoContext
private readonly Dictionary _publicOnlyModules = new();
private readonly Dictionary _context = new();
- internal static bool IsSupported { get; } =
- AppContext.TryGetSwitch("System.Reflection.NullabilityInfoContext.IsSupported", out bool isSupported) ? isSupported : true;
-
[Flags]
private enum NotAnnotatedStatus
{
@@ -75,9 +72,6 @@ public NullabilityInfo Create(ParameterInfo parameterInfo)
#else
NetstandardHelpers.ThrowIfNull(parameterInfo, nameof(parameterInfo));
#endif
-
- EnsureIsSupported();
-
IList attributes = parameterInfo.GetCustomAttributesData();
NullableAttributeStateParser parser = parameterInfo.Member is MethodBase method && IsPrivateOrInternalMethodAndAnnotationDisabled(method)
? NullableAttributeStateParser.Unknown
@@ -204,9 +198,6 @@ public NullabilityInfo Create(PropertyInfo propertyInfo)
#else
NetstandardHelpers.ThrowIfNull(propertyInfo, nameof(propertyInfo));
#endif
-
- EnsureIsSupported();
-
MethodInfo? getter = propertyInfo.GetGetMethod(true);
MethodInfo? setter = propertyInfo.GetSetMethod(true);
bool annotationsDisabled = (getter == null || IsPrivateOrInternalMethodAndAnnotationDisabled(getter))
@@ -263,9 +254,6 @@ public NullabilityInfo Create(EventInfo eventInfo)
#else
NetstandardHelpers.ThrowIfNull(eventInfo, nameof(eventInfo));
#endif
-
- EnsureIsSupported();
-
return GetNullabilityInfo(eventInfo, eventInfo.EventHandlerType!, CreateParser(eventInfo.GetCustomAttributesData()));
}
@@ -284,9 +272,6 @@ public NullabilityInfo Create(FieldInfo fieldInfo)
#else
NetstandardHelpers.ThrowIfNull(fieldInfo, nameof(fieldInfo));
#endif
-
- EnsureIsSupported();
-
IList attributes = fieldInfo.GetCustomAttributesData();
NullableAttributeStateParser parser = IsPrivateOrInternalFieldAndAnnotationDisabled(fieldInfo) ? NullableAttributeStateParser.Unknown : CreateParser(attributes);
NullabilityInfo nullability = GetNullabilityInfo(fieldInfo, fieldInfo.FieldType, parser);
@@ -294,14 +279,6 @@ public NullabilityInfo Create(FieldInfo fieldInfo)
return nullability;
}
- private static void EnsureIsSupported()
- {
- if (!IsSupported)
- {
- throw new InvalidOperationException(SR.NullabilityInfoContext_NotSupported);
- }
- }
-
private bool IsPrivateOrInternalFieldAndAnnotationDisabled(FieldInfo fieldInfo)
{
if ((fieldInfo.IsPrivate || fieldInfo.IsFamilyAndAssembly || fieldInfo.IsAssembly) &&
diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Reflection/NullabilityInfoContextTests.cs b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Reflection/NullabilityInfoContextTests.cs
index 77c6984d68e62..343e951d176c2 100644
--- a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Reflection/NullabilityInfoContextTests.cs
+++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Reflection/NullabilityInfoContextTests.cs
@@ -284,43 +284,6 @@ public void GenericDictionaryPropertyTest(string propertyName, NullabilityState
Assert.Null(nullability.ElementType);
}
- [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]
- public void VerifyIsSupportedThrows()
- {
- RemoteInvokeOptions options = new RemoteInvokeOptions();
- options.RuntimeConfigurationOptions.Add("System.Reflection.NullabilityInfoContext.IsSupported", "false");
-
- using RemoteInvokeHandle remoteHandle = RemoteExecutor.Invoke(() =>
- {
- FieldInfo field = testType.GetField("FieldNullable", flags);
- Assert.Throws(() => nullabilityContext.Create(field));
-
- EventInfo @event = testType.GetEvent("EventNullable");
- Assert.Throws(() => nullabilityContext.Create(@event));
-
- PropertyInfo property = testType.GetProperty("PropertyNullable", flags);
- Assert.Throws(() => nullabilityContext.Create(property));
-
- MethodInfo method = testType.GetMethod("MethodNullNonNullNonNon", flags);
- Assert.Throws(() => nullabilityContext.Create(method.ReturnParameter));
- }, options);
- }
-
- [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]
- public void VerifyIsSupportedWorks()
- {
- RemoteInvokeOptions options = new RemoteInvokeOptions();
- options.RuntimeConfigurationOptions.Add("System.Reflection.NullabilityInfoContext.IsSupported", "true");
-
- using RemoteInvokeHandle remoteHandle = RemoteExecutor.Invoke(() =>
- {
- FieldInfo field = testType.GetField("FieldNullable", flags);
- NullabilityInfo nullability = nullabilityContext.Create(field);
- Assert.Equal(NullabilityState.Nullable, nullability.ReadState);
- Assert.Equal(NullabilityState.Nullable, nullability.WriteState);
- }, options);
- }
-
public static IEnumerable