Skip to content

Test-ModuleManifest should not check everything incl .dll, xml, resouces files #2610

Closed

Description

@jianyunt

It looks like the behavior of Test-ModuleManifest has been changed. It checks all files under one folder. It might be a good feature addition if came with a new switch. This behavior should not be ON by default. Please see the errors below. It complains about psget.resources.psd1 or format.ps1xml, or even checkin dll is not valid manifest. These errors are unexpected.

Steps to reproduce

  1. go to PS /opt/microsoft/powershell/6.0.0-alpha.11/Modules/PowerShellGet>
  2. Test-ModuleManifest -Path ./PowerShellGet.psd1
    or try PSReadline.psd1

Expected behavior

No error

Actual behavior

PS /opt/microsoft/powershell/6.0.0-alpha.11/Modules/PowerShellGet> Test-ModuleManifest -Path ./PowerShellGet.psd1                                                                                                   
Test-ModuleManifest : The specified FileList entry 'PSModule.psm1' in the module manifest 
'/opt/microsoft/powershell/6.0.0-alpha.11/Modules/PowerShellGet/PowerShellGet.psd1' is invalid. Try 
again after updating this entry with valid values.
At line:1 char:1
+ Test-ModuleManifest -Path ./PowerShellGet.psd1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (./PowerShellGet.psd1:String) [Test-ModuleManifest], Direc 
   toryNotFoundException
    + FullyQualifiedErrorId : Modules_InvalidFilePathinModuleManifest,Microsoft.PowerShell.Commands.Test 
   ModuleManifestCommand
 
Test-ModuleManifest : The specified FileList entry 'PSGet.Format.ps1xml' in the module manifest 
'/opt/microsoft/powershell/6.0.0-alpha.11/Modules/PowerShellGet/PowerShellGet.psd1' is invalid. Try 
again after updating this entry with valid values.
At line:1 char:1
+ Test-ModuleManifest -Path ./PowerShellGet.psd1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (./PowerShellGet.psd1:String) [Test-ModuleManifest], Direc 
   toryNotFoundException
    + FullyQualifiedErrorId : Modules_InvalidFilePathinModuleManifest,Microsoft.PowerShell.Commands.Test 
   ModuleManifestCommand
 
Test-ModuleManifest : The specified FileList entry 'PSGet.Resource.psd1' in the module manifest 
'/opt/microsoft/powershell/6.0.0-alpha.11/Modules/PowerShellGet/PowerShellGet.psd1' is invalid. Try 
again after updating this entry with valid values.
At line:1 char:1
+ Test-ModuleManifest -Path ./PowerShellGet.psd1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (./PowerShellGet.psd1:String) [Test-ModuleManifest], Direc 
   toryNotFoundException
    + FullyQualifiedErrorId : Modules_InvalidFilePathinModuleManifest,Microsoft.PowerShell.Commands.Test 
   ModuleManifestCommand
 

Environment data

Name                           Value                                                                     
----                           -----                                                                     
PSVersion                      6.0.0-alpha                                                               
PSEdition                      Core                                                                      
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                   
BuildVersion                   3.0.0.0                                                                   
GitCommitId                    v6.0.0-alpha.11                                                           
CLRVersion                                                                                               
WSManStackVersion              3.0                                                                       
PSRemotingProtocolVersion      2.3                                                                       
SerializationVersion           1.1.0.1   

Activity

  1. bmanikm commented on Feb 3, 2017

    @bmanikm
    Contributor

    Due to this issue, users are unable to install few modules, like Team, on Ubuntu OS.

    Save-Module Team -path /tmp
    Test-ModuleManifest -Path /tmp/Team/0.1.12/team.psd1 -verbose
  2. modified the milestones: , 6.0.0-alpha.16 on Feb 4, 2017
  3. added a commit that references this issue on Feb 4, 2017
  4. SteveL-MSFT commented on Feb 4, 2017

    @SteveL-MSFT
    Member

    Submitted #3097 to fix this. Note that the issue seems to really only be that test-modulemanifest didn't normalize paths correctly and had a hard coded '' for directory separator so it wouldn't ever work on non-Windows. You'll still get one error for PowerShellGet.psd1 on Linux because the RequiredModule version doesn't match what is on Linux.

  5. added a commit that references this issue on Aug 6, 2026
    e6cec3a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Blockedblocked on something external to this repoResolution-FixedThe issue is fixed.WG-Cmdletsgeneral cmdlet issues

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions