diff --git a/src/libraries/System.Private.CoreLib/src/System/AppDomain.cs b/src/libraries/System.Private.CoreLib/src/System/AppDomain.cs index 7cd1e8e97a4e8..cd11786858904 100644 --- a/src/libraries/System.Private.CoreLib/src/System/AppDomain.cs +++ b/src/libraries/System.Private.CoreLib/src/System/AppDomain.cs @@ -7,6 +7,7 @@ using System.Diagnostics; using System.IO; using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; using System.Runtime.Loader; using System.Runtime.Remoting; @@ -386,6 +387,8 @@ public void SetThreadPrincipal(IPrincipal principal) return oh?.Unwrap(); } + [PreserveDependency("GetDefaultInstance", "System.Security.Principal.GenericPrincipal", "System.Security.Claims")] + [PreserveDependency("GetDefaultInstance", "System.Security.Principal.WindowsPrincipal", "System.Security.Principal.Windows")] internal IPrincipal? GetThreadPrincipal() { IPrincipal? principal = _defaultPrincipal; diff --git a/src/libraries/System.Security.Claims/src/ILLinkTrim.xml b/src/libraries/System.Security.Claims/src/ILLinkTrim_LibraryBuild.xml similarity index 100% rename from src/libraries/System.Security.Claims/src/ILLinkTrim.xml rename to src/libraries/System.Security.Claims/src/ILLinkTrim_LibraryBuild.xml diff --git a/src/libraries/System.Security.Principal.Windows/src/ILLinkTrim.xml b/src/libraries/System.Security.Principal.Windows/src/ILLinkTrim_LibraryBuild.xml similarity index 100% rename from src/libraries/System.Security.Principal.Windows/src/ILLinkTrim.xml rename to src/libraries/System.Security.Principal.Windows/src/ILLinkTrim_LibraryBuild.xml