Skip to main content

BuildSetup

This page was generated

Contributions are welcome in Psake-repo.

Since Psake 5.0

This command was introduced in Psake 5.0 and is not available in earlier versions.

SYNOPSIS​

Adds a scriptblock that will be executed once at the beginning of the build

SYNTAX​

__AllParameterSets​

BuildSetup [-Setup] <scriptblock> [<CommonParameters>]

DESCRIPTION​

Runs once before the first task executes. Use this to set up shared state, logging, or environment validation for the whole build.

EXAMPLES​

EXAMPLE 1​

Task default -Depends Test
Task Test -Depends Compile, Clean {}
Task Compile -Depends Clean {}
Task Clean {}
BuildSetup {
"Running 'BuildSetup'"
}

The script above produces the following output:

Running 'BuildSetup'
Executing task, Clean...
Executing task, Compile...
Executing task, Test...
Build Succeeded

PARAMETERS​

-Setup​

Executed once before any tasks run.

Type: System.Management.Automation.ScriptBlock
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters​

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS​

OUTPUTS​

NOTES​

VERSION​

This page was generated using comment-based help in Psake 5.0.4.