-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Always append the "dll" extension for native libraries loads on Windows #66666
Always append the "dll" extension for native libraries loads on Windows #66666
Conversation
Due to case-sensitive file systems on Windows the runtime will now always append the ".dll" extension unless the name contains a trailing "." or a known loadable extensions. This is an attempt to mitigate the default Windows behavior that appends a ".DLL" which is rarely the casing used for Windows shared libraries.
My cursory look in Mono indicates they do not suffer from this issue. @lambdageek can you confirm my understanding of the following code: runtime/src/mono/mono/metadata/native-library.c Lines 492 to 510 in ba5a582
|
Yes. I don't think how this was done makes a lot of sense. Having this code duplication logic is a recipe for failure. Thanks for pointing it out. |
Based on commit history, the duplicate implementation in managed is used by NativeAOT. |
And AssemblyDependencyResolver. |
Mono will probe for several different variations on the name - first as given, then with the So I agree - I don't think Mono is affected. |
...s/Loader/AssemblyDependencyResolver/AssemblyDependencyResolverTests/NativeDependencyTests.cs
Show resolved
Hide resolved
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
…ws (dotnet#66666) * Always append the "dll" extension for native libraries loads on Windows Due to case-sensitive file systems on Windows the runtime will now always append the ".dll" extension unless the name contains a trailing "." or a known loadable extensions. This is an attempt to mitigate the default Windows behavior that appends a ".DLL" which is rarely the casing used for Windows shared libraries. Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Fixes #66608
Due to case-sensitive file systems on Windows the runtime will now always append the ".dll" extension unless the name contains a trailing "." or a known loadable extension. This is an attempt to mitigate the default Windows behavior that appends a ".DLL" which is rarely the casing used for Windows shared libraries.
Documentation PR to follow.
/cc @dotnet/interop-contrib