diff --git a/ManagedWimLib/ManagedWimLib.csproj b/ManagedWimLib/ManagedWimLib.csproj index b87918e..13d8195 100644 --- a/ManagedWimLib/ManagedWimLib.csproj +++ b/ManagedWimLib/ManagedWimLib.csproj @@ -1,12 +1,12 @@  - net451;netstandard2.0;netstandard2.1 - netstandard2.0;netstandard2.1 + net451;netstandard2.0;netcoreapp3.1 + netstandard2.0;netcoreapp3.1 ManagedWimLib ManagedWimLib latest true - 2.3.1 + 2.4.0 Eric Biggers, Hajin Jang Joveler Native wimlib wrapper library for .NET. @@ -17,7 +17,8 @@ Supports Windows, Linux and macOS. https://github.com/ied206/ManagedWimLib images\Logo.png https://github.com/ied206/ManagedWimLib - - Official support for ARM64 macOS. + - Official support for ARM64 macOS. +- Replace .NET Standard 2.1 target with .NET Core 3.1. wim wimlib dism imagex archive native pinvoke interop @@ -36,8 +37,8 @@ Supports Windows, Linux and macOS. PreserveNewest - - + + runtimes\win-x86\native\%(FileName)%(Extension) PreserveNewest diff --git a/README.md b/README.md index ed634af..4a49561 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ ManagedWimLib can be installed via [nuget](https://www.nuget.org/packages/Manage ### Targeted .NET platforms -- .NET Standard 2.1 (.NET Core 3.0+) -- .NET Standard 2.0 (.NET Framework 4.6.1+, .NET Core 2.0+) +- .NET Core 3.1 +- .NET Standard 2.0 - .NET Framework 4.5.1 If you need .NET Standard 1.3 support, use [1.2.x version](https://www.nuget.org/packages/ManagedWimLib/1.2.4) instead.
diff --git a/USAGE.md b/USAGE.md index d81522e..b0b5b5f 100644 --- a/USAGE.md +++ b/USAGE.md @@ -36,11 +36,12 @@ public static void InitNativeLibrary() } ``` -#### For .NET Standard 2.0+: +#### For .NET Standard 2.0+, NET Core 3.1+: ```cs public static void InitNativeLibrary() { + string libBaseDir = AppDomain.CurrentDomain.BaseDirectory; string libDir = "runtimes"; if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) libDir = Path.Combine(libDir, "win-"); @@ -66,13 +67,14 @@ public static void InitNativeLibrary() } libDir = Path.Combine(libDir, "native"); + // macOS ARM64 requires native library path to be absolute path. string libPath = null; if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - libPath = Path.Combine(libDir, "libwim-15.dll"); + libPath = Path.Combine(libBaseDir, libDir, "libwim-15.dll"); else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - libPath = Path.Combine(libDir, "libwim.so"); + libPath = Path.Combine(libBaseDir, libDir, "libwim.so"); else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - libPath = Path.Combine(libDir, "libwim.dylib"); + libPath = Path.Combine(libBaseDir, libDir, "libwim.dylib"); if (libPath == null) throw new PlatformNotSupportedException($"Unable to find native library."); @@ -100,7 +102,7 @@ ManagedWimLib comes with sets of binaries of `wimlib 1.13.4`. They will be copie - Create an empty file named `ManagedWimLib.Precompiled.Exclude` in the project directory to prevent a copy of the package-embedded binary. -#### For .NET Standard 2.0+ +#### For .NET Standard 2.0, NET Core 3.1+ | Platform | Binary | License | |----------------------|-----------------------------------------------------|----------------------|