Skip to content
Open
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
8 changes: 8 additions & 0 deletions Realm/Realm/Native/NativeCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ internal static void Initialize()
if (libraryName == InteropConfig.DLL_NAME)
{
libraryName = "@rpath/realm-wrappers.framework/realm-wrappers";

var runtimeVersion = Environment.Version;
if (runtimeVersion.Major >= 10)
{
// .NET 10 breaking change: Application directory is no longer used when searching for DLLs
// We need to explicitly add it to the search path
searchPath |= DllImportSearchPath.ApplicationDirectory;
}
}

return NativeLibrary.Load(libraryName, assembly, searchPath);
Expand Down
Loading