Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[runtime] Try to load assemblies from bundles on netcore before trying other methods, the ALC might not be initialized yet. #34877

Merged
merged 1 commit into from
Apr 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/mono/mono/metadata/assembly.c
Original file line number Diff line number Diff line change
Expand Up @@ -4806,9 +4806,7 @@ mono_assembly_request_byname (MonoAssemblyName *aname, const MonoAssemblyByNameR
result = prevent_reference_assembly_from_running (result, refonly);
}
#else
result = netcore_load_reference (aname, req->request.alc, req->requesting_assembly, !req->no_postload_search);

if (!result && bundles != NULL) {
if (bundles != NULL) {
MonoImageOpenStatus status;
MonoImage *image;
image = mono_assembly_open_from_bundle (req->request.alc, aname->name, &status, FALSE);
Expand All @@ -4819,6 +4817,8 @@ mono_assembly_request_byname (MonoAssemblyName *aname, const MonoAssemblyByNameR
if (image)
result = mono_assembly_request_load_from (image, aname->name, &req->request, &status);
}
if (!result)
result = netcore_load_reference (aname, req->request.alc, req->requesting_assembly, !req->no_postload_search);
#endif
return result;
}
Expand Down