dotnet/TorchSharp

Calls to NativeLibrary should not assume explicit paths

glopesdev opened this issue · 0 comments

It seems extremely error-prone to presume to replace the OS-specific library search strategies. It doesn't feel like library developers should assume they have to rewrite how native libraries are found in the system. Application developers should worry about their specific deployments if this doesn't work for them.

This line:

ok = NativeLibrary.TryLoad(path, out var res);

should really just use the full TryLoad overload.