From 3631ded5dc11f514ff633e142f3bb1ff60581062 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Mon, 27 Apr 2026 10:54:57 -0700 Subject: [PATCH] Fix trimming test exclusions for iOS/tvOS simulator CoreCLR builds The aggressive trimming test exclusion condition in tests.proj only checked for 'ios', 'tvos', and 'maccatalyst' TargetOS values, missing 'iossimulator' and 'tvossimulator'. This caused trimming-sensitive tests (EventSource, DI, DiagnosticSource, etc.) to run on iOS CoreCLR simulator Release builds where EnableAggressiveTrimming=true (added by PR #127054), resulting in NullReferenceException failures when trimmed reflection metadata was accessed. Replace the explicit TargetOS list with the TargetsAppleMobile property (defined in eng/OSArch.props) which covers all five Apple mobile targets and is already used elsewhere in the same file. Fixes #127449 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/libraries/tests.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index d6c4aed495b680..e9007937c35bcc 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -378,7 +378,7 @@ - +