Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DllImport probing #689

ericstj opened this Issue Mar 21, 2018 · 1 comment


None yet
2 participants
Copy link

ericstj commented Mar 21, 2018

CoreCLR allows for more variations of DllImport probing:
As a result we should update our list:

var moduleRefCandidates = new[] { moduleName, moduleName + ".dll", moduleName + ".so", moduleName + ".dylib" };

Today it's missing the prefixes.

@ericstj ericstj self-assigned this Mar 21, 2018


This comment has been minimized.

Copy link
Member Author

ericstj commented Mar 21, 2018

We should fallback through the precedence where we consider all possible suffixes. Today we work in most cases due to co-location of native files and package rooting (eg: root the file containing one native impl and all are included) but if that package is marked trimmable, we'd miss the SO if a dll also existed.

I think our algo should look similar to the coreclr's fallback list, except we consider all prefixes/suffixes rather than just the one for our current platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.