You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Files listed in FileList in module manifest are loaded on module load #12821
Committee-ReviewedPS-Committee has reviewed this and made a decisionIssue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtime
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 first, before looking at GAC.
Hence, the behavior in 6.2.x and 7.0.x is different from Windows PowerShell.
I 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.
If we decide to not fix it, it might make moving from Windows PowerShell to PowerShell 7 more difficult.
I 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
Steps to reproduce
Load a module with managed assemblies in FileList in the psd1
It's also worth noting that if the module happens to list native libraries (unmanaged compiled code) in the FileList, those loads will always fail, and the native library actually can't be loaded at all after that point. Not sure of the underlying mechanism there, but it's an extra edge case that can complicate matters. 🙂
Committee-ReviewedPS-Committee has reviewed this and made a decisionIssue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtime
Activity
vexx32 commentedon May 28, 2020
It's also worth noting that if the module happens to list native libraries (unmanaged compiled code) in the FileList, those loads will always fail, and the native library actually can't be loaded at all after that point. Not sure of the underlying mechanism there, but it's an extra edge case that can complicate matters. 🙂
adityapatwardhan commentedon May 28, 2020
Rain Sallow (/u/ta11ow) (@vexx32) thanks for adding that.
SeeminglyScience commentedon May 28, 2020
Yes please. I've taken to just removing that field from manifests because it also throws if the assembly is already loaded.
SteveL-MSFT commentedon Jun 3, 2020
@PowerShell/powershell-committee reviewed this, we agreed that the desire is to have: