Skip to content

Disable SystemCoreLibDirectory on ReadyToRun#129178

Open
BrzVlad wants to merge 1 commit into
dotnet:mainfrom
BrzVlad:disable-test-custom-spc
Open

Disable SystemCoreLibDirectory on ReadyToRun#129178
BrzVlad wants to merge 1 commit into
dotnet:mainfrom
BrzVlad:disable-test-custom-spc

Conversation

@BrzVlad

@BrzVlad BrzVlad commented Jun 9, 2026

Copy link
Copy Markdown
Member

This test copies SPC.dll to a custom path and then tests that it is able to load it from this path, instead of the default path. The problem is when the framework is R2R compiled in composite mode. The new SPC.dll will point to the composite image. This tweaked SPC.dll gets copied to another location where the loading of the R2R image fails. I believe the runtime crashing here is the right behavior and tweaking the test to copy framework-r2r.dll as well seems like overkill.

This test copies SPC.dll to a custom path and then tests that it is able to load it from this path, instead of the default path. The problem is when the framework is R2R compiled in composite mode. The new SPC.dll will point to the composite image. This tweaked SPC.dll gets copied to another location where the loading of the R2R image fails. I believe the runtime crashing here is the right behavior and tweaking the test to copy framework-r2r.dll as well seems like overkill.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the CoreCLR loader test SystemCoreLibDirectory to opt out of CrossGen2 / ReadyToRun test runs, based on the test’s reliance on redirecting System.Private.CoreLib.dll to a different directory.

Changes:

  • Mark the SystemCoreLibDirectory test project as not eligible for CrossGen2/R2R runs by setting <CrossGenTest>false</CrossGenTest>.

Comment on lines +7 to +9
<!-- Loading SPCL from a separate directory is incompatible with R2R composite mode
because the composite image won't be found beside the redirected assembly. -->
<CrossGenTest>false</CrossGenTest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants