Report correct DLL name when P/Invoke lookup fails (#58863)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fri, 10 Sep 2021 16:01:39 +0000 (18:01 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Sep 2021 16:01:39 +0000 (18:01 +0200)
commit7c7169e03c49ece469db2a79c0d42f249de5a5f3
tree94dc304f56dd697ab1115e4b495a83d3770cfd6d
parent9f92f0e35d27547e493d80fbf94ca0825c710242
Report correct DLL name when P/Invoke lookup fails (#58863)

Without this PR when a P/Invoke lookup fails we'll return an exception message that refers to `libcoreclr` instead of the real native library name since we have logic to retry the lookup using libcoreclr. This is very confusing for customers as can be seen in https://github.com/dotnet/runtime/issues/58185.

Co-authored-by: Filip Navara <navara@emclient.com>
src/mono/mono/metadata/native-library.c