-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Test-ModuleManifest fails on manifest from New-ModuleManifest #6676
Copy link
Copy link
Closed
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-AnsweredThe question is answered.The question is answered.
Description
I ran into this when attempting to test one of my existing module manifests and was able to reproduce it with the simpler steps below.
Steps to reproduce
> New-ModuleManifest 'test.psd1' -RootModule 'test'
> Test-ModuleManifest '.\test.psd1'Expected behavior
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 0.0.1 testActual behavior
Test-ModuleManifest : The module manifest 'test' could not be processed because it is not a valid PowerShell module manifest file. Remove the elements that are not permitted: C:\Users\me\test.psd1
At line:1 char:1
+ Test-ModuleManifest '.\test.psd1'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (.\test.psd1:String) [Test-ModuleManifest], ArgumentException
+ FullyQualifiedErrorId : Modules_InvalidRootModuleInModuleManifest,Microsoft.PowerShell.Commands.TestModuleManifestCommandEnvironment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.2
PSEdition Core
GitCommitId v6.0.2
OS Microsoft Windows 10.0.16299
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Note: This succeeds on Windows PSVersion 5.1.16299.251
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-AnsweredThe question is answered.The question is answered.