Closed
Description
Hello,
Usage of this command on existing module manifest breaks it's content. I wanted to use this command inside build pipeline to update ModuleVersion attribute, but found at least 2 things that got broken on my manifest module:
- RequiredAssembles attribute: I have something like below in my manifest file, and
Update-ModuleManifest
removes this attribute completely
RequiredAssemblies = if($PSEdition -eq 'Desktop') {@('lib\net45\someAssembly.dll')} else {$null}
- PrivateData attribute: I have added additional content as hashtable
Messages
to module'sPrivateData
as addtional hashtable aside fromPSData
as shown below, however,Update-ModuleManifest
changes theMessages
hashtable toMessages = 'System.Collections.Hashtable'
, which breaks the logic of module
PrivateData = @{
Messages = @{
NotInitialized = 'Call Initialize-Module before running other cmdlets.'
}
PSData = @{
# ... standard content
}
Would be great to update the command so as it does not change the attributes that are not passed from command line, or at least document here what gets changed/reset when command is run, so as users are not surprised after running it.
Thank you,
Jiri
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 69b6c2e3-f28a-c1a7-7e78-6c0d26001eea
- Version Independent ID: 304167af-fdd4-e3aa-c3e3-79a912844e8a
- Content: Update-ModuleManifest (PowerShellGet) - PowerShell
- Content Source: reference/7.0/PowerShellGet/Update-ModuleManifest.md
- Product: powershell
- Technology: powershell-cmdlets
- GitHub Login: @edyoung
- Microsoft Alias: edyoung