Closed crimsonread closed 1 year ago
Seems the module was not generated correctly since this path C:\workfolder\test\source\.psd1'
should be 'C:\workfolder\test\source\test.psd1'
and since that path is wrong the project name is empty but should say test
.
What did you run to create the "test" module?
Seems the module was not generated correctly since this path
C:\workfolder\test\source\.psd1'
should be'C:\workfolder\test\source\test.psd1'
and since that path is wrong the project name is empty but should saytest
.What did you run to create the "test" module?
I can see C:\workfolder\test\source\test.psd1 is existed. I ran below command to create test module.
New-SampleModule -DestinationPath C:\workfolder\ -ModuleDescription "test" -ModuleType CompleteSample -ModuleAuthor "duck" -ModuleName test -LicenseType MIT -ModuleVersion "0.1.0"
Could reproduce. If you look at the module manifest there are duplicate entries of Prerelease
, remove one and it should build,
Let’s keep this open so we can track this bug.
Okay. Thanks!
And just FYI, we have the same behavior if we choose moduletype SimpleModule as well.
There was different behavior on PowerShell and Windows PowerShell when creating the module manifest. So when the modify
section that was meant to reuse the already present but commented Prerelease
string it also ran the modify
statement that adds the Prerelease
for a module manifest that is created under Windows PowerShell resulting in two when creating a module under PowerShell 7.x. Now it will add a commented Perelease
key and then next modify
statement will remove the comment, making it work on all version of PowerShell (hopefully). 🙂
There is now a prerelease version out that fixes this issue. Will release a full release in a week or so (if no major issues are reported on the preview).
Hello,
I'm the beginner for this module. When I run build.ps1 for the first time for the complete sample module, I encountered below error message and have no idea what I should look into.
/./build/Build_Module_ModuleBuilder/Build_ModuleOutput_ModuleBuilder C:\workfolder\test\output\RequiredModules\Sampler\0.116.5\tasks\Build-Module.ModuleBuilder.build.ps1:41
ERROR: Cannot find path 'C:\workfolder\test\source.psd1' because it does not exist. At C:\workfolder\test\output\RequiredModules\Sampler\0.116.5\Sampler.psm1:491 char:27