-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Problem description
When building my module, PSFRedirect, of an offline system, it generates the error Missing an argument for parameter 'Completed'.
I was able to use to off-line system until I upgraded Sampler to the latest version on an online build system.
Even when upgrading the version of Sampler and all the dependency modules, the issue persists. I also tried rebooting the system after upgrading Sampler to 0.118.2 along with the corresponding dependency modules listed on the online system.
In my trouble shooting efforts, I removed the original Sampler module, so I can't say what version I used when the issues started on the off-line system.
Verbose logs
D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public [main ≡]> .\build.ps1 build -Verbose
[pre-build] Starting Build Init
VERBOSE: Loading module from path 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\powershell-yaml\0.4.12\powershell-yaml.psm1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\powershell-yaml\0.4.7\Load-Assemblies.ps1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\powershell-yaml\0.4.7\powershell-yaml.psm1'.
VERBOSE: Loading module from path 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\InvokeBuild\5.12.1\InvokeBuild.psm1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\InvokeBuild\5.12.1\InvokeBuild.psm1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\InvokeBuild\5.11.3\InvokeBuild.psm1'.
VERBOSE: Loading module from path D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\PSDepend\0.3.8\PSDepend.psm1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PSDepend\0.3.8\PSDepend.psm1'.
[build] Starting build with InvokeBuild.
VERBOSE: Loading module from path 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\powershell-yaml\0.4.12\powershell-yaml.psm1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\powershell-yaml\0.4.7\Load-Assemblies.ps1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\powershell-yaml\0.4.7\powershell-yaml.psm1'.
VERBOSE: Loading module from path 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\InvokeBuild\5.12.1\InvokeBuild.psm1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\InvokeBuild\5.12.1\InvokeBuild.psm1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\InvokeBuild\5.11.3\InvokeBuild.psm1'.
VERBOSE: Loading module from path 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\PSDepend\0.3.8\PSDepend.psm1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PSDepend\0.3.8\PSDepend.psm1'.
[build] Parsing defined tasks
[build] Loading Configuration from D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\build.yaml
VERBOSE: Loading module from path 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\powershell-yaml\0.4.12\powershell-yaml.psd1'.
VERBOSE: Importing function 'ConvertFrom-Yaml'.
VERBOSE: Importing function 'ConvertTo-Yaml'.
VERBOSE: Importing alias 'cfy'.
VERBOSE: Importing alias 'cty'.
Importing tasks from module Sampler.GitHubTasks
VERBOSE: Loading module from path
'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\Sampler.GitHubTasks\0.3.4\Sampler.GitHubTasks.psd1'.
VERBOSE: Importing function 'Get-GHOwnerRepoFromRemoteUrl'.
VERBOSE: Importing alias 'New-Release.GitHub.build.Sampler.GitHubTasks.ib.tasks'.
Loading New-Release.GitHub.build.Sampler.GitHubTasks.ib.tasks...
Importing tasks from module Sampler
VERBOSE: Loading module from path 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\Sampler\0.118.2\Sampler.psd1'.
VERBOSE: Importing function 'Add-Sample'.
VERBOSE: Importing function 'Convert-SamplerHashtableToString'.
VERBOSE: Importing function 'Get-BuildVersion'.
VERBOSE: Importing function 'Get-BuiltModuleVersion'.
VERBOSE: Importing function 'Get-ClassBasedResourceName'.
VERBOSE: Importing function 'Get-CodeCoverageThreshold'.
VERBOSE: Importing function 'Get-MofSchemaName'.
VERBOSE: Importing function 'Get-OperatingSystemShortName'.
VERBOSE: Importing function 'Get-PesterOutputFileFileName'.
VERBOSE: Importing function 'Get-Psm1SchemaName'.
VERBOSE: Importing function 'Get-SamplerAbsolutePath'.
VERBOSE: Importing function 'Get-SamplerBuiltModuleBase'.
VERBOSE: Importing function 'Get-SamplerBuiltModuleManifest'.
VERBOSE: Importing function 'Get-SamplerCodeCoverageOutputFile'.
VERBOSE: Importing function 'Get-SamplerCodeCoverageOutputFileEncoding'.
VERBOSE: Importing function 'Get-SamplerModuleInfo'.
VERBOSE: Importing function 'Get-SamplerModuleRootPath'.
VERBOSE: Importing function 'Get-SamplerProjectName'.
VERBOSE: Importing function 'Get-SamplerSourcePath'.
VERBOSE: Importing function 'Invoke-SamplerGit'.
VERBOSE: Importing function 'Merge-JaCoCoReport'.
VERBOSE: Importing function 'New-SampleModule'.
VERBOSE: Importing function 'New-SamplerJaCoCoDocument'.
VERBOSE: Importing function 'New-SamplerPipeline'.
VERBOSE: Importing function 'Out-SamplerXml'.
VERBOSE: Importing function 'Set-SamplerPSModulePath'.
VERBOSE: Importing function 'Split-ModuleVersion'.
VERBOSE: Importing function 'Update-JaCoCoStatistic'.
VERBOSE: Importing alias 'Build-Module.ModuleBuilder.build.Sampler.ib.tasks'.
VERBOSE: Importing alias 'ChocolateyPackage.build.Sampler.ib.tasks'.
VERBOSE: Importing alias 'Clean.ModuleBuilder.build.Sampler.ib.tasks'.
VERBOSE: Importing alias 'Create_Changelog_Branch.build.Sampler.ib.tasks'.
VERBOSE: Importing alias 'Create_Release_Git_Tag.build.Sampler.ib.tasks'.
VERBOSE: Importing alias 'DeployAll.PSDeploy.build.Sampler.ib.tasks'.
VERBOSE: Importing alias 'DscResource.Test.build.Sampler.ib.tasks'.
VERBOSE: Importing alias 'generateHelp.PlatyPS.build.Sampler.ib.tasks'.
VERBOSE: Importing alias 'GuestConfig.build.Sampler.ib.tasks'.
VERBOSE: Importing alias 'Invoke-Pester.pester.build.Sampler.ib.tasks'.
VERBOSE: Importing alias 'JaCoCo.coverage.build.Sampler.ib.tasks'.
VERBOSE: Importing alias 'release.module.build.Sampler.ib.tasks'.
VERBOSE: Importing alias 'Set-SamplerTaskVariable'.
VERBOSE: Importing alias 'SetPsModulePath.build.Sampler.ib.tasks'.
Loading Build-Module.ModuleBuilder.build.Sampler.ib.tasks...
Loading ChocolateyPackage.build.Sampler.ib.tasks...
Loading Clean.ModuleBuilder.build.Sampler.ib.tasks...
Loading Create_Changelog_Branch.build.Sampler.ib.tasks...
Loading Create_Release_Git_Tag.build.Sampler.ib.tasks...
Loading DeployAll.PSDeploy.build.Sampler.ib.tasks...
Loading DscResource.Test.build.Sampler.ib.tasks...
Loading generateHelp.PlatyPS.build.Sampler.ib.tasks...
Loading GuestConfig.build.Sampler.ib.tasks...
Loading Invoke-Pester.pester.build.Sampler.ib.tasks...
Loading JaCoCo.coverage.build.Sampler.ib.tasks...
Loading release.module.build.Sampler.ib.tasks...
Loading Set-SamplerTaskVariable...
Loading SetPsModulePath.build.Sampler.ib.tasks...
Adding Workflow from configuration:
+-> test
+-> pack
+-> build
+-> publish
+-> .
[build] Executing requested workflow: build
Build build D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\build.ps1
Redefined task '.'.
===============================================================================
CLEAN
Deleting the content of the Build Output folder, except ./modules
-------------------------------------------------------------------------------
/build/Clean
D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\Sampler\0.118.2\tasks\Clean.ModuleBuilder.build.ps1:16
Removing D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\* excluding RequiredModules
Done /build/Clean 00:00:00.2964379
===============================================================================
BUILD MODULEOUTPUT MODULEBUILDER
Build the Module based on its Build.psd1 definition
-------------------------------------------------------------------------------
/build/Build_Module_ModuleBuilder/Build_ModuleOutput_ModuleBuilder
D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\Sampler\0.118.2\tasks\Build-Module.ModuleBuilder.build.ps1:41 Project Name = 'PSFRedirect' Source Path = 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\source' Output Directory = 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output' Release Notes path = 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\ReleaseNotes.md' Built Module Subdirectory = 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\module'
Module Manifest Path (src) = 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\source\PSFRedirect.psd1'
Module Version = '0.0.24'
PSModulePath = 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\module;
D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules;
C:\Users\uadm_dsl\Documents\WindowsPowerShell\Modules;
C:\Program Files\WindowsPowerShell\Modules;
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;'
VERBOSE: Loading module from path 'D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\ModuleBuilder\3.1.0\ModuleBuilder.psd1'.
WARNING: The names of some imported commands from the module 'ModuleBuilder' include unapproved verbs that might make
them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the
Verbose parameter. For a list of approved verbs, type Get-Verb.
VERBOSE: The 'Build-Module' command in the ModuleBuilder' module was imported, but because its name does not include an
approved verb, it might be difficult to find. The suggested alternative verbs are "New".
VERBOSE: Importing function 'Build-Module'.
VERBOSE: Importing function 'Convert-Breakpoint'.
VERBOSE: Importing function 'Convert-CodeCoverage'.
VERBOSE: Importing function 'ConvertFrom-SourceLineNumber'.
VERBOSE: Importing function 'ConvertTo-SourceLineNumber'.
VERBOSE: Importing alias 'build'.
VERBOSE: Importing alias 'Convert-LineNumber'.
Adding OutputDirectory with value D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output from current Variables
Adding VersionedOutputDirectory with value True from current Variables
Adding CopyPaths with value en-US from Build Info
Adding Encoding with value UTF8 from Build Info
Building Module to D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\module\PSFRedirect...
ERROR: Missing an argument for parameter 'Completed'. Specify a parameter of type 'System.Object' and try again.
At D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\Sampler\0.118.2\tasks\Build-Module.ModuleBuilder.build.ps1:101 char:20
+ $BuiltModule = Build-Module @buildModuleParams -PassThru
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\Sampler\0.118.2\tasks\Build-Module.ModuleBuilder.build.ps1:41 char:1
+ Task Build_ModuleOutput_ModuleBuilder {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build FAILED. 4 tasks, 1 errors, 0 warnings 00:00:03.0236092
Build-Module : Missing an argument for parameter 'Completed'. Specify a parameter of type 'System.Object' and try
again.
At D:\UsbRepos\@GitHub\dennisl\PSFRedirect_Public\output\RequiredModules\Sampler\0.118.2\tasks\Build-Module.ModuleBuild
er.build.ps1:101 char:20
+ $BuiltModule = Build-Module @buildModuleParams -PassThru
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Build-Module], ParameterBindingException
+ FullyQualifiedErrorId : MissingArgument,Build-Module
How to reproduce
I don't know how to recreate the issue.
Expected behavior
Using a newer version of Sampler should not break old setups as long as all modules are upgraded.
Current behavior
The build doesn't complete.
Suggested solution
I have no more suggestions.
Operating system the target node is running
OsName : Microsoft Windows 10 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OSArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage : en-US
OsMuiLanguages : {en-US}
PowerShell version and build the target node is running
Name Value
---- -----
PSVersion 5.1.19041.5369
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.5369
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerilizationVersion 1.1.0.1
Module version used
Name Version Path
---- ------- ----
Sampler 0.118.2 C:\Porgram Files\WindowsPowerShell\Modules\Sampler\0.118.2\Sampler.psd1
Sampler 0.118.1 C:\Porgram Files\WindowsPowerShell\Modules\Sampler\0.118.1\Sampler.psd1