System.Runtime.Loader.Tests: use TargetsAppleMobile for test-assembly references to unblock trimmed simulator/macCatalyst builds#128135
Open
Copilot wants to merge 2 commits into
Open
Conversation
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix build errors for System.Runtime.Loader.Tests on Apple mobile platforms
System.Runtime.Loader.Tests: use TargetsAppleMobile for test-assembly references to unblock trimmed simulator/macCatalyst builds
May 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts System.Runtime.Loader.Tests project reference conditions so Apple mobile targets consistently use direct ProjectReferences (instead of embedding the referenced test assemblies as resources), aligning the behavior across iOS/tvOS, simulators, and MacCatalyst.
Changes:
- Switch conditional logic from
$(TargetOS) == ios/tvosto$(TargetsAppleMobile)forSystem.Runtime.Loader.Test.AssemblyandSystem.Runtime.Loader.Test.Assembly2. - Keep the existing non-Apple-mobile behavior of embedding those referenced assemblies as resources (
ReferenceOutputAssembly="false",OutputItemType="EmbeddedResource"). - Update the inline comment to reflect the Apple-mobile-specific restriction.
Show a summary per file
| File | Description |
|---|---|
src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj |
Uses TargetsAppleMobile to decide between direct references (Apple mobile) vs embedded resources (other targets) for two loader test assemblies. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
jkotas
approved these changes
May 13, 2026
Contributor
|
Tagging subscribers to this area: @agocke, @elinor-fung |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
System.Runtime.Loader.Tests was failing on Apple mobile simulator/macCatalyst CoreCLR legs because ILLink could not resolve
System.Runtime.Loader.Test.Assembly*during aggressive trimming. The project reference conditions only treatedios/tvosas mobile, leaving simulator/macCatalyst in the embedded-resource path.Scope
src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csprojonly.Change
TargetOS == ios/tvosgating for the two loader test assemblies withTargetsAppleMobile.TargetsAppleMobile == true: directProjectReference(assembly available to trimmer)ReferenceOutputAssembly="false",OutputItemType="EmbeddedResource")Why this resolves the failure
System.Runtime.Loader.Test.AssemblyandSystem.Runtime.Loader.Test.Assembly2as resolvable inputs.