When setting $PSBPreference.Build.CompileModule = $true in the properties block of a psakeFile.ps1 generated from the Plaster Stucco template v0.1.1 an error is generated.
Expected Behavior
PowerShellBuild should be correctly passed $true via $PSBPreference.Build.CompileModule and proceed to compile a monolithic .psm1 file in the build output directory.
Current Behavior
The following error is generated.
Task: CLEAN
Task: STAGEFILES
Task: GENERATEMARKDOWN
Error: 9/9/2019 11:03:07 PM:
At C:\gits\psmeetup\oldmod\issuemodule\Output\issuemodule\0.1.0\issuemodule.psm1:2 char:14 + ... public = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -Child ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [<<==>>] Exception: Cannot find path 'C:\gits\psmeetup\oldmod\issuemodule\Output\issuemodule\0.1.0\public\' because it does not exist.
Possible Solution
In testing it appears deleteing the contents of the Plater \ Stucco generated .psm1 file allows the build to complete and a monolithic .psm1 is generated in the build output directory.
Steps to Reproduce (for bugs)
Ensure development modules are current.
Get-Module plaster, stucco -ListAvailable | select name, version
Name Version
---- -------
Plaster 1.1.3
Stucco 0.1.1
Invoke plaster with stucco template.
Invoke-Plaster -TemplatePath $template.TemplatePath
Run through plaster prompts.
Modify generated psakeFile.ps1properties block set the value for $PSBPreference.Build.CompileModule from $false to $true.
properties {
# Disable "compiling" module into monolithinc PSM1.
# This modifies the default behavior from the "Build" task
# in the PowerShellBuild shared psake task module
$PSBPreference.Build.CompileModule = $true
}
Run build.
./build.ps1 -Bootstrap
Context
Unable to generate a monolithic .psm1 file due to build erroring out.
Your Environment
Module version used: 0.3.0
Operating System and PowerShell version: Windows 10, 5.1.17134.137
When setting
$PSBPreference.Build.CompileModule = $true
in theproperties
block of apsakeFile.ps1
generated from the Plaster Stucco templatev0.1.1
an error is generated.Expected Behavior
PowerShellBuild should be correctly passed
$true
via$PSBPreference.Build.CompileModule
and proceed to compile a monolithic.psm1
file in the build output directory.Current Behavior
The following error is generated.
Possible Solution
In testing it appears deleteing the contents of the Plater \ Stucco generated
.psm1
file allows the build to complete and a monolithic.psm1
is generated in the build output directory.Steps to Reproduce (for bugs)
Ensure development modules are current.
$template = Get-PlasterTemplate -IncludeInstalledModules | Where-Object TemplatePath -Match 'Stucco'
Invoke-Plaster -TemplatePath $template.TemplatePath
psakeFile.ps1
properties
block set the value for$PSBPreference.Build.CompileModule
from$false
to$true
../build.ps1 -Bootstrap
Context
Unable to generate a monolithic
.psm1
file due to build erroring out.Your Environment