From e9071f3bd5f94da846d72063509c4e4b6651a0dd Mon Sep 17 00:00:00 2001 From: Yoshifumi Kawai <46207+neuecc@users.noreply.github.com> Date: Sun, 2 Jul 2023 10:26:11 +0900 Subject: [PATCH] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9289f6c..c7f5b7a 100644 --- a/README.md +++ b/README.md @@ -311,18 +311,22 @@ internal static unsafe partial class NativeMethods if (libraryName == __DllName) { var path = "runtimes/"; + var extension = ""; + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { path += "win-"; - + extension = ".dll"; } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { path += "osx-"; + extension = ".dylib"; } else { path += "linux-"; + extension = ".so"; } if (RuntimeInformation.OSArchitecture == Architecture.X86) @@ -338,7 +342,7 @@ internal static unsafe partial class NativeMethods path += "arm64"; } - path += "/native/" + __DllName; + path += "/native/" + __DllName + extension; return NativeLibrary.Load(Path.Combine(AppContext.BaseDirectory, path), assembly, searchPath); }