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
Been using Psake locally for a while but looking to setup CI/CD for my PowerShell Modules and found the Psake Extension. However when I point that at my build.psake.ps1 script it fails due to being unable to locate the psake module as per the requires tag. I think I got the build.psake.ps1 script from a scaffolding with Plaster, just not sure if I should be writing my own custom script to wrap the build.psake.ps1 or not, but then why would I use the psake extension as I could just use the PowerShell task as I already have done and it works.
2018-02-19T01:06:43.0230747Z ##[section]Starting: psake build.psake.ps1 Build
2018-02-19T01:06:43.0499446Z ==============================================================================
2018-02-19T01:06:43.0499708Z Task : Psake
2018-02-19T01:06:43.0499904Z Description : Build with the psake build system
2018-02-19T01:06:43.0500112Z Version : 5.0.0
2018-02-19T01:06:43.0500480Z Author : Guillaume Rouchon
2018-02-19T01:06:43.0500710Z Help : v5.0.0, [More Information](https://github.com/psake/psake-vsts#readme)
2018-02-19T01:06:43.0500947Z ==============================================================================
2018-02-19T01:06:52.0386297Z psake version 4.7.0
2018-02-19T01:06:52.0386885Z Copyright (c) 2010-2017 James Kovacs & Contributors
2018-02-19T01:06:52.0387100Z
2018-02-19T01:06:52.9198223Z Error: 2/19/2018 1:06:52 AM:
2018-02-19T01:06:52.9198672Z At D:\a\_tasks\psake_a5a8cf40-b907-4f57-9d89-8d34034c3f97\5.0.0\ps_modules\psake\private\ExecuteInBuildFileScope.ps1:33 char:7
2018-02-19T01:06:52.9199004Z + . $psake.build_script_file.FullName
2018-02-19T01:06:52.9199324Z + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [<<==>>] Exception: The script 'build.psake.ps1' cannot be run because the following modules that are specified by the "#requires" statements of the script are missing: psake.
2018-02-19T01:06:53.2095252Z ##[error]Invoke-psake exited with build_success 'False'.
2018-02-19T01:06:53.2490951Z ##[section]Finishing: psake build.psake.ps1 Build
The text was updated successfully, but these errors were encountered:
Hi Matt,
The extension just contains the psake module and a bootstrap script to load the module and call Invoke-psake on your script. It seems that the #requires command doesn't find the loaded psake module.
Thanks @qetza I wasn't sure if I was doing something wrong or had missed something. If you need details of the build.psake.ps1 script I am using I can share it with you but I checked and it came from the Powershell/Plaster templates. Like you have called out though it seems to be an issue with the #requires statement and validating the psake module loaded in the extension.
What I did for the time being is a simple PowerShell task to run the following, but I would really like to use the Psake extension as it looks awesome
Been using Psake locally for a while but looking to setup CI/CD for my PowerShell Modules and found the Psake Extension. However when I point that at my build.psake.ps1 script it fails due to being unable to locate the psake module as per the requires tag. I think I got the build.psake.ps1 script from a scaffolding with Plaster, just not sure if I should be writing my own custom script to wrap the build.psake.ps1 or not, but then why would I use the psake extension as I could just use the PowerShell task as I already have done and it works.
The text was updated successfully, but these errors were encountered: