From 166262b6fa40c41ad8485b06915d2029fccc810a Mon Sep 17 00:00:00 2001 From: Jerome Haltom Date: Fri, 12 Jul 2024 16:28:59 -0500 Subject: [PATCH] Specify assembly so we search in relation to the same AppContext. Should fix #556. Signed-off-by: Jerome Haltom --- src/IKVM.Runtime/LibIkvm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IKVM.Runtime/LibIkvm.cs b/src/IKVM.Runtime/LibIkvm.cs index 528e3b652..5ceb9cabb 100644 --- a/src/IKVM.Runtime/LibIkvm.cs +++ b/src/IKVM.Runtime/LibIkvm.cs @@ -162,7 +162,7 @@ static nint LoadImpl(string nameOrPath) return Externs.IKVM_dl_open(nameOrPath); } #else - return System.Runtime.InteropServices.NativeLibrary.TryLoad(nameOrPath, out var h) ? h : 0; + return System.Runtime.InteropServices.NativeLibrary.TryLoad(nameOrPath, typeof(LibIkvm).Assembly, null, out var h) ? h : 0; #endif }