You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test-ModuleManifest does not populate the NestedModules field #7833
$a=Test-ModuleManifest-Path <path to module with filled out nestedmodules field>$a.NestedModule# Returns nothing
Expected behavior
$a = Test-ModuleManifest -Path <path to module with filled out nestedmodules field>
$a.NestedModule # Returns correct Nested Modules
Actual behavior
Returns nothing
Environment data
>$PSVersionTable
Name Value
---------
PSVersion 6.1.0-preview.4
PSEdition Core
GitCommitId 6.1.0-preview.4
OS Microsoft Windows 10.0.17134
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Ilya (@iSazonov) Ping - I can created a workaround for this using Set-Content, but I'd really like to use the Update-ModuleManifest as this is what the cmdlet was created for.
Okay, I steadily copied over fields from the psd1 I was using into a new module manifest, and figured out where this issue is. If any of these fields are ' * ', the nested module will be correctly found, but if all are not ' * ', it will not find the nested module:
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = '*'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = '*'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
Activity
iSazonov commentedon Sep 21, 2018
Maddie Clayton (@maddieclayton) Please check with latest build like 6.1 GA.
maddieclayton commentedon Sep 21, 2018
Ilya (@iSazonov) Same issue with 6.1. I can also repro when I pull down PowerShell and build it locally.
maddieclayton commentedon Sep 24, 2018
Ilya (@iSazonov) Ping - I can created a workaround for this using Set-Content, but I'd really like to use the Update-ModuleManifest as this is what the cmdlet was created for.
iSazonov commentedon Sep 25, 2018
Maddie Clayton (@maddieclayton) Thanks for update. Could you please compare with Get-Module result? Is there problem too?
SteveL-MSFT commentedon Sep 25, 2018
Not repro'ing for me, need more detailed steps/information:
maddieclayton commentedon Sep 25, 2018
Okay, I steadily copied over fields from the psd1 I was using into a new module manifest, and figured out where this issue is. If any of these fields are ' * ', the nested module will be correctly found, but if all are not ' * ', it will not find the nested module:
Easiest repro I can get is:
Let me know if you can repro using these steps.
SteveL-MSFT commentedon Sep 25, 2018
The detailed repro steps helped to isolate the root cause. Thanks!