Skip to content

Respect CompatiblePSEditions field in module manifests, with sane default #6991

@rjmholt

Description

@rjmholt

For Windows PowerShell/PowerShell Core modules to have a clear cross-compatibility story, we need PowerShell Core to respect the CompatiblePSEditions field.

This means, for PowerShell Core:

  • Get-Module -ListAvailable lists only those modules on the module path that are Core compatible
  • Import-Module will only import a module that is Core compatible and throw an error otherwise
  • The absence of the CompatiblePSEditions field should imply a sane default. The current suggested default is CompatiblePSEditions = @('Desktop'), i.e. compatible with Windows PowerShell (since there is no such field in Windows PowerShell and modules written for it only would lack this field by default).

Metadata

Metadata

Assignees

Labels

Issue-Enhancementthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.WG-DevEx-Portabilityauthoring cross-platform or cross-architecture modules, cmdlets, and scriptsWG-Enginecore PowerShell engine, interpreter, and runtime

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions