Closed Jamesthe1 closed 2 years ago
I'm sorry, but the changes in this PR are not correct. This project targets netstandard2.0
and netcoreapp3.1
. NativeLibrary.SetDllImportResolver
is only available in .NET Core 3.1 and newer, so the netstandard2.0
assembly cannot attempt to use it.
netstandard2.0
assembly, we correctly exclude the NativeLibrary.SetDllImportResolver
that would otherwise break compilation.When you're running on .NET Framework, you are using the netstandard2.0
assembly, so NativeLibrary.SetDllImportResolver
, which doesn't exist on .NET Framework, is not called.
Thanks for the PR, but I'm going to close this since this is not a change that makes sense to merge.
The section for .NET Core was left open for .NET Framework. As such, any build using .NET Framework would try to access NativeLibraries when it did not exist. The IF preprocessor statements have been swapped to fix this, and an additional build target for Framework 4.7.2 has been added.