private static IntPtr LoadNativeLibrary() { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return(LibraryLoader.LoadLocalLibrary("shaderc_shared.dll")); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { return(LibraryLoader.LoadLocalLibrary("libshaderc_shared.so")); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { return(LibraryLoader.LoadLocalLibrary("libshaderc_shared.dylib")); } else { return(LibraryLoader.LoadLocalLibrary("shaderc_shared")); } }