Moving to a netcoreapp3.1 TFM made it possible to use the NativeLibrary API directly instead of through reflection.
As part of this change it was also clear that the NativeLibraryPath property should be consistent, so it will no longer append the architecture to the path when running on .NET Framework.
This PR also includes a change to use RuntimeInformation.ProcessArchitecture instead of assuming x86 and x64 are the only two options. This will be increasingly untrue with all of the ARM support being added recently.
Moving to a
netcoreapp3.1
TFM made it possible to use theNativeLibrary
API directly instead of through reflection.As part of this change it was also clear that the
NativeLibraryPath
property should be consistent, so it will no longer append the architecture to the path when running on .NET Framework.This PR also includes a change to use
RuntimeInformation.ProcessArchitecture
instead of assuming x86 and x64 are the only two options. This will be increasingly untrue with all of the ARM support being added recently.