Open juneb opened 9 years ago
I think it would be best if lack of a PowerShellVersion attribute generated a warning that the PowerShellVersion attribute should be added for any modules that require PowerShell 3.0 or later. Legacy modules written for PowerShell 2.0 that work as is without a PowerShellVersion attribute in the manifest shouldn't be forced to have a manifest update when it is actually not required (hence the warning).
This brings up an interesting point about modules compatible with v2: we should probably provide a default profile that targets modules which intend to be compatible with v2.
Users need to know the PS version requirements for a module. To specify, add a value for PowerShellVersion key in the module manifest.
To verify, get the manifest: iex (cat -raw (gmo -list).Path)
Or PSModuleInfo (gmo -list).PowerShellVersion