Title: "Dependency on Native Libraries" adds extra file extensions · Issue #19277 · PowerShell/PowerShell · GitHub
Open Graph Title: "Dependency on Native Libraries" adds extra file extensions · Issue #19277 · PowerShell/PowerShell
X Title: "Dependency on Native Libraries" adds extra file extensions · Issue #19277 · PowerShell/PowerShell
Description: Update: So valid paths currently are: Linux: "./linux-x64/SQLite.Interop.dll.so" Windows: ".\win-x64\SQLite.Interop.dll.dll" Windows: ".\x64\SQLite.Interop.dll" OSX = "./osx-x64/SQLite.Interop.dll.dylib" Is this by design? Shouldn't it j...
Open Graph Description: Update: So valid paths currently are: Linux: "./linux-x64/SQLite.Interop.dll.so" Windows: ".\win-x64\SQLite.Interop.dll.dll" Windows: ".\x64\SQLite.Interop.dll" OSX = "./osx-x64/SQLite.Interop.dll....
X Description: Update: So valid paths currently are: Linux: "./linux-x64/SQLite.Interop.dll.so" Windows: ".\win-x64\SQLite.Interop.dll.dll" Windows: ".\x64\SQLite.Interop.dll" OSX = ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/19277
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"Dependency on Native Libraries\" adds extra file extensions","articleBody":"# Update:\r\nSo valid paths currently are:\r\nLinux: \"./linux-x64/SQLite.Interop.dll.so\"\r\nWindows: \".\\win-x64\\SQLite.Interop.dll.dll\"\r\nWindows: \".\\x64\\SQLite.Interop.dll\"\r\nOSX = \"./osx-x64/SQLite.Interop.dll.dylib\"\r\n\r\nIs this by design?\r\nShouldn't it just leave the file names as is without adding the extra extensions like \"foo.dll.dll\"?\r\n\r\nThis should probably be noted in documentation.\r\nAlso documentation example RIDs can be updated as mentioned in https://github.com/PowerShell/PowerShell/issues/19277#issuecomment-1454996760\r\n\r\n# Original\r\n### Prerequisites\r\n\r\n- [X] Write a descriptive title.\r\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- [X] Search the existing issues.\r\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\r\n\r\n### Steps to reproduce\r\n\r\nI don't understand how to use this or it doesn't work?\r\nhttps://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/writing-portable-modules?view=powershell-7.3#dependency-on-native-libraries\r\n\r\nExample module https://github.com/ili101/DependencyonNativeLibraries/tree/master/TestDependencies\r\nUsing manifest \"RequiredAssemblies\" or `Add-Type` in psm1 to load the dll then using the assembly by executing `Test-Dependencies` results in error:\r\n\"Unable to load shared library 'SQLite.Interop.dll' or one of its dependencies.\" ... \"No such file or directory\"\r\n\r\nWhen copying the the OS specific dll file to the same folder it works in Windows, Linux and macOS.\r\nSo why is this auto detecting feature of PS 7 not working here?\r\n\r\n### Expected behavior\r\n\r\n```console\r\nThe correct dependency native dll is loaded.\r\n```\r\n\r\n\r\n### Actual behavior\r\n\r\n```console\r\nIt looks for the dependency native dll in the same folder as the main dll and fail to load.\r\nOn windows it also work if the dependent dll placed in \"x64\" folder.\r\n```\r\nYou can see all OSs vs file location results in the GitHub Action https://github.com/ili101/DependencyonNativeLibraries/actions/runs/4328219121\r\n\r\n### Error details\r\n\r\n```console\r\n\"Exception calling \".ctor\" with \"1\" argument(s): \"Unable to load shared library 'SQLite.Interop.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libSQLite.Interop.dll: cannot open shared object file: No such file or directory\"\"\r\n```\r\n\r\n\r\n### Environment data\r\nDlls were generated by https://github.com/ili101/DependencyonNativeLibraries/tree/master/HelloWorld\r\n```powershell\r\nGitHub Actions uses:\r\nPSVersion : 7.2.9\r\n\r\nAlso tested on:\r\nName Value\r\n---- -----\r\nPSVersion 7.3.3\r\nPSEdition Core\r\nGitCommitId 7.3.3\r\nOS Microsoft Windows 10.0.22621\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n\r\n\r\n### Visuals\r\n\r\n_No response_","author":{"url":"https://github.com/ili101","@type":"Person","name":"ili101"},"datePublished":"2023-03-04T00:28:24Z","url":"https://github.com/PowerShell/PowerShell/issues/19277"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:28cd96db-c7df-0886-72e0-0ad95a3b1856 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE5C:26BB2A:DF7D5:13A615:6AFD4CAC |
| html-safe-nonce | ef683857b8b9a79b5a227441b7eece7ac7434c72d79d114cb3d4daf3f83ada55 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTVDOjI2QkIyQTpERjdENToxM0E2MTU6NkFGRDRDQUMiLCJ2aXNpdG9yX2lkIjoiNDQ0NjA1MDU3MjA5MjM5NDY2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bdd627feb9edefae3ecf3b17dd75ae5424d79c518ee8fde1e417e19190984c2e |
| hovercard-subject-tag | issue:1609472302 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/19277/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b8fad5c6e4057b73477ea49bcc3a74af9ff3d1ebdf9d7e5150ccb1fdfa9f9edc/PowerShell/PowerShell/issues/19277 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b8fad5c6e4057b73477ea49bcc3a74af9ff3d1ebdf9d7e5150ccb1fdfa9f9edc/PowerShell/PowerShell/issues/19277 |
| og:image:alt | Update: So valid paths currently are: Linux: "./linux-x64/SQLite.Interop.dll.so" Windows: ".\win-x64\SQLite.Interop.dll.dll" Windows: ".\x64\SQLite.Interop.dll" OSX = "./osx-x64/SQLite.Interop.dll.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ili101 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width