-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Binary modules that worked in PowerShell 6 may not work in 7 #11053
Copy link
Copy link
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.The issue won't be fixed, possibly due to compatibility reason.WG-DevEx-SDKhosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of moduleshosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of modulesWG-Maintainers-Buildspecific to affecting the buildspecific to affecting the build
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.The issue won't be fixed, possibly due to compatibility reason.WG-DevEx-SDKhosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of moduleshosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of modulesWG-Maintainers-Buildspecific to affecting the buildspecific to affecting the build
@iSazonov and @SteveL-MSFT I think we made a mistake by removing the
WorkflowInfotype in PR #9638. I know PR #6708 changed the type from public to internal, and that was probably a mistake as well.I was just testing my FormatPx module in PowerShell 7, since
Out-Printeris now added back into PowerShell, but the module won't load. It fails with the following error:I get the same error if I try to import DebugPx into PowerShell 7, but DebugPx loads just fine in PowerShell 6.2 (FormatPx does not, because there is no
Out-Printercommand, and it derives itsOut-Printerproxy from that command).Both DebugPx and FormatPx have binary modules as part of their package.
I am not referencing
WorkflowInfodirectly from either of those projects, so that error must be coming from the PowerShell components that I do reference.Testing this out locally, I have found that if I put an empty
public WorkflowInfoclass back in PowerShell 7 (not derived from anything, with no constructors or members), suddenly my DebugPx module loads fine again.FormatPx loads as well, but doesn't work (null reference exception somewhere), but so I need to figure that one out. That issue aside, it seems we need the
WorkflowInfoclass to persist for backwards compatibility support. Mind if I put it back in a PR?Steps to reproduce
Expected behavior
The module should load without error.
Actual behavior
Environment data