Title: Files listed in `FileList` in module manifest are loaded on module load · Issue #12821 · PowerShell/PowerShell · GitHub
Open Graph Title: Files listed in `FileList` in module manifest are loaded on module load · Issue #12821 · PowerShell/PowerShell
X Title: Files listed in `FileList` in module manifest are loaded on module load · Issue #12821 · PowerShell/PowerShell
Description: Since version 6.2.0-preview.2 all the files listed in FileList are loaded when the module is loaded. This is change in behavior caused by PR #8073 which was done to support a customer issue about loading assemblies from module folder fir...
Open Graph Description: Since version 6.2.0-preview.2 all the files listed in FileList are loaded when the module is loaded. This is change in behavior caused by PR #8073 which was done to support a customer issue about l...
X Description: Since version 6.2.0-preview.2 all the files listed in FileList are loaded when the module is loaded. This is change in behavior caused by PR #8073 which was done to support a customer issue about l...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/12821
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Files listed in `FileList` in module manifest are loaded on module load","articleBody":"Since version `6.2.0-preview.2` all the files listed in `FileList` are loaded when the module is loaded.\r\n\r\nThis is change in behavior caused by PR #8073 which was done to support a customer issue about loading assemblies from module folder first, before looking at GAC.\r\n\r\nHence, the behavior in `6.2.x` and `7.0.x` is different from Windows PowerShell. \r\n\r\nI believe the current behavior is wrong and should be fixed. But, since it as release in `6.2.x` and `7.0.x` it will be a breaking change. \r\n\r\nIf we decide to not fix it, it might make moving from Windows PowerShell to PowerShell 7 more difficult.\r\n\r\nI would like opinion from committee about fixing the issue in `7.1` and whether it should be back ported to `7.0.x` and `6.2.x`\r\n\r\n# Steps to reproduce\r\n\r\nLoad a module with managed assemblies in FileList in the psd1\r\n\r\n```powershell\r\n$filesBefore = [System.AppDomain]::CurrentDomain.GetAssemblies()\r\nImport-Module \u003c>\r\n$filesAfter = [System.AppDomain]::CurrentDomain.GetAssemblies()\r\n Compare-Object -ReferenceObject $filesBefore -DifferenceObject $filesAfter\r\n```\r\n\r\n# Expected behavior\r\n\r\n```none\r\nFiles in FileList should not be loaded\r\n```\r\n\r\n# Actual behavior\r\n\r\n```none\r\nFiles in FileList are loaded.\r\n```\r\n\r\n# Environment data\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```none\r\nName Value\r\n---- -----\r\nPSVersion 7.0.1\r\nPSEdition Core\r\nGitCommitId 7.0.1\r\nOS Microsoft Windows 10.0.19635\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","author":{"url":"https://github.com/adityapatwardhan","@type":"Person","name":"adityapatwardhan"},"datePublished":"2020-05-28T00:20:09Z","url":"https://github.com/PowerShell/PowerShell/issues/12821"}
| 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:4251d800-68dd-464a-dc50-6001dd4ee97f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AA12:10FB47:328D0F:44F1C5:6AFD560D |
| html-safe-nonce | 918db8f497307c233893fe4bc6c1375caa7afc1881907092518c02aceeaedc3d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTEyOjEwRkI0NzozMjhEMEY6NDRGMUM1OjZBRkQ1NjBEIiwidmlzaXRvcl9pZCI6IjU3NzYzMzY5MTMwMTA4NzM4NjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 01f9d7ff6f8e09c6967d4739f64473075fa2c9d5562f45de9d9155eb0a064eab |
| hovercard-subject-tag | issue:626122817 |
| 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/12821/issue_layout |
| twitter:image | https://opengraph.githubassets.com/086ef43aec48fbe6b315f7aad80a013e109df1ed9e8a9704371e91cd42fa37b0/PowerShell/PowerShell/issues/12821 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/086ef43aec48fbe6b315f7aad80a013e109df1ed9e8a9704371e91cd42fa37b0/PowerShell/PowerShell/issues/12821 |
| og:image:alt | Since version 6.2.0-preview.2 all the files listed in FileList are loaded when the module is loaded. This is change in behavior caused by PR #8073 which was done to support a customer issue about l... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | adityapatwardhan |
| 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