X Tutup
The Wayback Machine - https://web.archive.org/web/20221020052008/https://github.com/PowerShell/PowerShell/issues/18330
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove -DotnetFrameworkVersion and -ClrVersion from New-ModuleManifest #18330

Open
SteveL-MSFT opened this issue Oct 19, 2022 · 3 comments
Open
Labels
Breaking-Change breaking change that may affect users Issue-Enhancement the issue is more of a feature request than a bug Needs-Triage The issue is new and needs to be triaged by a work group. WG-Cmdlets general cmdlet issues

Comments

@SteveL-MSFT
Copy link
Member

SteveL-MSFT commented Oct 19, 2022

Summary of the new feature / enhancement

Per MicrosoftDocs/PowerShell-Docs#9328 these members in the module manifest are no longer valid and keeping it can cause confusion on why it's not doing what the author thinks it should be doing.

Proposed technical implementation details (optional)

No response

@SteveL-MSFT SteveL-MSFT added Issue-Enhancement the issue is more of a feature request than a bug WG-Cmdlets general cmdlet issues Breaking-Change breaking change that may affect users Needs-Triage The issue is new and needs to be triaged by a work group. labels Oct 19, 2022
@iSazonov
Copy link
Collaborator

iSazonov commented Oct 19, 2022

What about ProcessorArchitecture?

#18320 (comment)

@Jaykul
Copy link
Contributor

Jaykul commented Oct 19, 2022

Proposed technical implementation details (optional)

The obsolete parameters should be marked obsolete via documentation (and hidden if possible from tab completion) but not removed (since they don't break things, and removing them might break existing scripts).

Optionally, when a value is provided, the cmdlet can output a warning that these fields don't work correctly in modern PowerShell. NOTE: this is for DotnetFrameworkVersion and CLRVersion which legitimately don't work.

Finally, I think it would be great if we could not put the commented out text for these in the psd1 (when there's no value passed in to the parameter).

What about ProcessorArchitecture?

#18320 (comment)

Surely there are PowerShell modules that don't/only work on ARM? But I don't know if this one works or not.

However, at the very least, I think it would be useful to have all the parameters that are rarely used and are complicated to get right ... just not output in the PSD1 unless they have a value. The commented out lines aren't useful. That's at least these:

  • ProcessorArchitecture
  • PowerShellHostName
  • PowerShellHostVersion
  • FileList
  • DefaultCommandPrefix

@iSazonov
Copy link
Collaborator

iSazonov commented Oct 20, 2022

Search results on Windows Server 2019 with RSAT:

C:\Windows\System32\WindowsPowerShell\v1.0\Modules\BestPractices\BestPractices.psd1:33:CLRVersion = '4.0'
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\DFSR\DFSR.psd1:38:CLRVersion = '4.0'
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\NetSecurity\NetSecurity.psd1:34:    ClrVersion = '4.0'
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PersistentMemory\PersistentMemory.psd1:31:CLRVersion = '4.0'
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSScheduledJob\PSScheduledJob.psd1:17:CLRVersion = '4.0'
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\RemoteDesktop\RemoteDesktop.psd1:41:CLRVersion = '4.0'
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\ScheduledTasks\ScheduledTasks.psd1:9:    ClrVersion = '4.0'
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\ServerManager\ServerManager.psd1:9:CLRVersion = '4.0'
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Whea\Whea.psd1:36:CLRVersion = '4.0'


C:\Windows\System32\WindowsPowerShell\v1.0\Modules\DFSR\DFSR.psd1:35:DotNetFrameworkVersion = '4.0'


C:\Windows\System32\WindowsPowerShell\v1.0\Modules\AppvClient\AppvClient.psd1:18:ProcessorArchitecture = 'AMD64'

I also tried to find at least one module with ProcessorArchitecture with a non-empty value on GitHub, but I couldn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking-Change breaking change that may affect users Issue-Enhancement the issue is more of a feature request than a bug Needs-Triage The issue is new and needs to be triaged by a work group. WG-Cmdlets general cmdlet issues
Projects
None yet
Development

No branches or pull requests

3 participants
X Tutup