Skip to content

Getting Started

Luca Sgroi edited this page Apr 8, 2017 · 18 revisions

Install as NuGet Package

Pask should be installed via NuGet Package Manager in Visual Studio 2015/2017.
NuGet will initialize the package as follows:

  • Create .build, a solution-level directory which is the home of build scripts and tasks
  • Create .build\.gitignore and .nuget\.gitignore to intentionally ignore build output and NuGet files
  • Create go.bat which is a batch file to easily execute Pask default task
  • Create/update Pask.ps1, the build runner
  • Create/update .build\scripts\Pask.ps1, Pask script which is where its functions are defined
  • Create .build\build.ps1, the main build script; refer to Invoke-Build Script Tutorial

The build runner and Pask.ps1 script are updated automatically by Pask package and they should not be modified.

Default build script

Import-Task Restore-NuGetPackages, Clean, Build, Version-BuildServer, Version-Assemblies

# Synopsis: Default task
Task . Restore-NuGetPackages, Clean, Build

# Synopsis: Release task
Task Release Version-BuildServer, Restore-NuGetPackages, Clean, Version-Assemblies, Build

Run the build

Open a PowerShell session and execute the build runner to invoke the default task:

PS C:\Path_to_your_solution> .\Pask.ps1

Alternatively, execute the go.bat batch file.

Clone this wiki locally