diff --git a/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs b/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs index f79334a96befd..d23742fa7bbfd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs @@ -217,6 +217,9 @@ public static int Size [CLSCompliant(false)] [Intrinsic] [NonVersionable] +#if PROJECTN + [System.Runtime.CompilerServices.DependencyReductionRootAttribute] +#endif public unsafe void* ToPointer() { return _value; diff --git a/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs b/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs index 9534f4f872809..c57dd86a76bbf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs @@ -208,6 +208,9 @@ public static unsafe int Size [Intrinsic] [NonVersionable] +#if PROJECTN + [System.Runtime.CompilerServices.DependencyReductionRootAttribute] +#endif public unsafe void* ToPointer() { return _value;