Please feel free to provide feedback or file bugs here.

[Bug] Update-ModuleManifest fails if TypesToProcess or FormatsToProcess have values

If a module contains valid values for the TypesToProcess or FormatsToProcess properties, Update-ModuleManifest fails with this error:

> Update-ModuleManifest -Path .\Carbon\Carbon.psd1 -Tags 'fubar','snafu'
Update-ModuleManifest : Cannot update the manifest file '.\Carbon\Carbon.psd1' because the manifest is not valid. Verify that the manifest file is valid, and then try again.'The member 'TypesToProcess' in the module manifest is not valid: Cannot find path
'C:\Users\ajensen\AppData\Local\Temp\810183328\Carbon\Carbon.types.ps1xml' because it does not exist.. Verify that a valid value is specified for this field in the 'C:\Users\ajensen\AppData\Local\Temp\810183328\NewManifest.psd1' file.'
At line:1 char:1
+ Update-ModuleManifest -Path .\Carbon\Carbon.psd1 -Tags 'fubar','snafu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (System.Argument...rd errorRecord):ArgumentException) [Update-ModuleManifest], ArgumentException
+ FullyQualifiedErrorId : UpdateManifestFileFail,Update-ModuleManifest

21552 F:\Build\Carbon (default)> psedit .\Carbon\Carbon.psd1

21553 F:\Build\Carbon (default)> Update-ModuleManifest -Path .\Carbon\Carbon.psd1 -Tags 'fubar','snafu'
Update-ModuleManifest : Cannot update the manifest file '.\Carbon\Carbon.psd1' because the manifest is not valid. Verify that the manifest file is valid, and then try again.'The member 'FormatsToProcess' in the module manifest is not valid: Cannot find path
'C:\Users\ajensen\AppData\Local\Temp\391338803\Carbon\Carbon.format.ps1xml' because it does not exist.. Verify that a valid value is specified for this field in the 'C:\Users\ajensen\AppData\Local\Temp\391338803\NewManifest.psd1' file.'
At line:1 char:1
+ Update-ModuleManifest -Path .\Carbon\Carbon.psd1 -Tags 'fubar','snafu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (System.Argument...rd errorRecord):ArgumentException) [Update-ModuleManifest], ArgumentException
+ FullyQualifiedErrorId : UpdateManifestFileFail,Update-ModuleManifest

My Carbon module's manifest (https://bitbucket.org/splatteredbits/carbon/src/2.1.1/Carbon/Carbon.psd1?fileviewer=file-view-default) points to valid .ps1xml files that exist, but Update-ModuleManifest doesn't seem to think so.

Steps to Reproduce
1. Create a module manifest.
2. Create a types .ps1xml file in the same directory as the manifest.
3. Update the module manifest's TypesToProcess property to be the name of the types .ps1xml file (no path necessary since it is in the same directory as the manifest.
4. Run any Update-ModuleManifest command against the manifest. Note the error.

I expect that Update-ModuleManifest would handle external dependencies and either ignore them, or copy them to its temporary directory.

9 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Aaron Jensen shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Krishna C Vutukuri commented  ·   ·  Flag as inappropriate

        Thanks for reporting this issue. We plan to fix this issue in future releases of PowerShellGet.

        Thanks
        Krishna
        Windows PowerShell Team

      Feedback and Knowledge Base