System.Runtime failed to load
Description
Using native app test under android arm64, it prompts that the System.Runtime dependency cannot be loaded successfully
Reproduction Steps
1.Build dotnet with the following cmd:
./build.sh mono+libs -os Android -arch arm64 -c release
2.Run the following test program:
int main(int argc, char* argv[]) {
mono_set_assemblies_path("/data/local/tmp/dotnet/assemblies");
mono_trace_set_level_string("debug");
MonoDomain *domain;
domain = mono_jit_init_version("XMONO Root Domain", "v4.0.30319");
if (!domain){
LOGD("mono_jit_init failed");
return -1;
}
auto assembly = mono_domain_assembly_open(domain, "/data/local/tmp/dotnet/XGame.exe");
if (assembly == nullptr) {
LOGD("mono_assembly_load_from_full failed");
return -1;
}
mono_jit_exec(domain, assembly, argc, argv);
return 0;
}
- The error log is as follows

4.The code that causes this error is as follows:
https://github.com/dotnet/runtime/blob/126045ca05ea4dec4c987d72095e9dbf0a233f4a/src/mono/mono/metadata/assembly.c#L1973
Expected behavior
run successfully
Actual behavior
Dependency not loaded
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
Tagging subscribers to this area: See info in area-owners.md if you want to be subscribed.
Issue Details
Description
Using native app test under android arm64, it prompts that the System.Runtime dependency cannot be loaded successfully
Reproduction Steps
1.Build dotnet with the following cmd:
./build.sh mono+libs -os Android -arch arm64 -c release
2.Run the following test program:
int main(int argc, char* argv[]) {
mono_set_assemblies_path("/data/local/tmp/dotnet/assemblies");
mono_trace_set_level_string("debug");
const char* opt[] = {"--soft-breakpoints", "--debugger-agent=address=127.0.0.1:56000,server=y,transport=dt_socket,suspend=n", "--disable_omit_fp"};
mono_jit_parse_options(sizeof(opt)/sizeof(char*), (char**)opt);
mono_debug_init(MONO_DEBUG_FORMAT_MONO);
MonoDomain *domain;
domain = mono_jit_init_version("XMONO Root Domain", "v4.0.30319");
if (!domain){
LOGD("mono_jit_init failed");
return -1;
}
auto assembly = mono_domain_assembly_open(domain, "/data/local/tmp/dotnet/XGame.exe");
if (assembly == nullptr) {
LOGD("mono_assembly_load_from_full failed");
return -1;
}
mono_jit_exec(domain, assembly, argc, argv);
return 0;
}
- The error log is as follows

4.The code that causes this error is as follows:
https://github.com/dotnet/runtime/blob/126045ca05ea4dec4c987d72095e9dbf0a233f4a/src/mono/mono/metadata/assembly.c#L1973
Expected behavior
run successfully
Actual behavior
Dependency not loaded
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
| Author: | evilzhou |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |