Releases: psake/psake
[5.0.0] - 2026-03-21 Alpha
Added
- Declarative Task syntax:
Task 'Build' @{ DependsOn = 'Clean'; Action = { ... } }with validated keys (typos throw errors) Versiondeclaration:Version 5at the top of a build file enforces the required psake major version- Hashtable
Propertiessyntax:Properties @{ Config = 'Release' }as alternative to scriptblock - Two-phase compile/run model: dependency graph is validated via topological sort before any task executes; circular dependencies and missing tasks are caught at compile time
-CompileOnlyparameter onInvoke-psake: returns the build plan without executing tasks (for tooling/testing)- Local file-based caching: tasks with
Inputs/Outputs(glob patterns or scriptblocks) are content-addressed cached in.psake/cache/; unchanged tasks are skipped -NoCacheparameter onInvoke-psake: bypass caching for a single run- Structured output:
Invoke-psakereturns aPsakeBuildResultwith per-taskPsakeTaskResult(status, duration, cached flag) -OutputFormat JSON|GitHubActionsparameter onInvoke-psakefor CI integration; GitHubActions emits::error::,::warning::,::debug::workflow annotations-Quietparameter onInvoke-psake: suppress all console output while still returning structured resultsGet-PsakeBuildPlanfunction: testability API to compile a build file and inspect the plan without executingTest-PsakeTaskfunction: testability API to execute a single task in isolation without triggering dependenciesClear-PsakeCachefunction: clear the local task cacheCachedcolumn in Build Time Report showing which tasks were served from cacheInputs,Outputs,InputHash,Cached,Executedproperties onPsakeTaskclassPsakeBuildPlanclass for compile-phase build plan representationPsakeBuildResultandPsakeTaskResultclasses for structured output- Migration guide at
docs/migration-v4-to-v5.md
Changed
- Minimum PowerShell version raised to 5.1 (was 3.0)
- Default .NET Framework version changed from
4.0to4.7.2 Invoke-psakenow returns aPsakeBuildResultobject (previously returned nothing);$psake.build_successis retained for backward compatibilityNew-Object PSObjectreplaced with[PSCustomObject]in module internals- Console output uses
Write-BuildMessagewith$env:NO_COLORsupport; colored output is disabled automatically whenNO_COLORis set
Removed
default.ps1fallback: build files must be namedpsakefile.ps1(or specified explicitly via-BuildFile)- Standalone runner scripts
psake.ps1andpsake.cmd: useImport-Module psake; Invoke-psakeinstead - .NET Framework versions 1.0, 1.1, 2.0, 3.0, 3.5: only 4.0 and above are supported
- Deprecated
$frameworkglobal variable: use theFrameworkfunction orpsake-config.ps1instead - PowerShell 2.0 compatibility code
LegacyBuildFileNameconfiguration optionOutputHandler,OutputHandlers, andColoredOutputconfiguration properties: output is now handled byWrite-BuildMessagewith format-based routing (-OutputFormat GitHubActionsfor CI annotations)Write-PsakeOutputandWrite-ColoredOutputinternal functionspsake-config.ps1output handler override examples
[4.9.1] 2024-10-06
Fixed
- #296 Fix
-ContinueOnError
functionality (via @UberDoodles) - Required variables set on a task are now validated even if the task has no
action defined.
Improvements
[4.9.0] 2019-09-21
Fixed
- Fix hashtable references so strict mode works when set in the psakeFile.
- #283 Fix path issue for msbuild is VS 2019. (via @jaymclain)
- #287 In
Execfunction, always rerun command in specified location (via @tiksn and @UberDoodles)
Added
- #281 Support for .Net 4.8 in
Frameworkfunction (via @granit1986) - #285 Add BuildSetup and BuildTearDown functions that are executed at the beginning of the build (before the first task), and at the end of the build (after either all tasks have completed, or a task has failed). (via @UberDoodles)
[4.8.0] 2019-04-23
Features
- Add support for loading in tasks contained in PowerShell modules
Improvements
-
#267 Add wrapper script for Linux and macOS. (via @dermeister0)
-
#268 Allow more granularity when specifying versions of modules to load when referencing shared tasks (via @RandomNoun7)
-
#274 Add support for Visual Studio 2019 and MSBuild 16.0. (via @petedavis)
-
#276 Pass task detail including error information into TaskSetup and TaskTearDown. (via @davidalpert)
v4.7.4
[4.7.4] 2018-09-07
Fixed
-
#260 Change the build time report to show individual task durations instead of cumulative (via @sideproject)
-
#261 Use
$global:lastexitcodeinstead of$lastexitcodein Exec (via @gpetrou)
Improvements
- #259 Add $psake.error_message property which contains the error message that cause the build to fail (via @sideproject)
v4.7.3
v4.7.2
v4.7.1
[4.7.1] 2018-07-03
Improvements
- #244 Update build success message to be more general: psake succeeded (via @rkeithhill)
- #249 Allow working with preloaded VSSetup module (via @havranek1024)
Fixed
- #236 Change check for
$IsWindowsso it doesn't generate an error record (via @rkeithhill)
v4.7.0
[4.7.0] 2017-11-21
As part of this release we had 13 issues closed.
Features
-
#198 Add support for PowerShell Core on macOS and Linux. (via @dbroeglin)
-
#196 Deprecate default build script name
default.ps1in favor ofpsakefile.ps1. (via @glennsarti) -
Remove legacy PowerShell v2 support. PSake now supports v3 and above.
Improvements
-
#228 Project structure refactor (via @devblackops)
-
#227 Ensure postAction and taskTeardown tasks get called after action failure (via @stephan-dowding)
-
#222 Add support for .Net frameworks 4.6.2, 4.7, and 4.7.1. (via @rkeithhill)
-
#218 Improve Build Time Report by using custom
FormatTaskNamevalue for header and display task timing at millisecond accuracy instead of microsecond. (via @theunrepentantgeek) -
#200 Add
WorkingDirectoryparameter toExecfunction. (via @DaveSenn) -
#190 Use
WriteColoredOutputfor all task headers. (via @damianpowell)
v4.6.0
As part of this release we had 6 issues closed.
Bug
- #149 Using ErrorAction Ignore in PSv3+
Features
- #153 Invoke-psake with option to return documentation should return objects instead of formated string
- #147 Added an option '-notr' to disable output of time report.
- #143 Publish Psake on PowerShellGallery
Improvements