In old mono, there was a command line flag or a environment variable or something you could add so that whenever pinvoke attempted to load a C DLL, it would verbose print every path it checked and every path it checked for every dependency.
I'm running a C# app with dotnet.exe (8.0.301) on Windows 10. I get "System.DllNotFoundException: Unable to load DLL '[redacted]' or one of its dependencies". [redacted].dll is present. How I get more diagnostic output? dotnet.exe -d does not provide it.