Questions tagged [psake]

psake (pronounced *sah-kay*, as in Japanese rice wine) is a build automation tool implemented in Windows PowerShell.

Description

psake (pronounced sah-kay, as in Japanese rice wine) is a build automation tool implemented in Windows PowerShell. psake has a syntax inspired by rake (aka make in Ruby) and bake (aka make in Boo).

Example Build Script

properties { 
  $testMessage = ‘Executed Test!’ 
  $compileMessage = ‘Executed Compile!’ 
  $cleanMessage = ‘Executed Clean!’ 
}

task default -depends Test

task Test -depends Compile, Clean { 
  Write-Host $testMessage 
}

task Compile -depends Clean { 
  Write-Host $compileMessage 
}

task Clean { 
  Write-Host $cleanMessage 
}

Resources

105 questions
44
votes
5 answers

Where does a TeamCity build agent get its path environment from?

I'm trying to set up TeamCity to build my project, but my psake buildscript fails, with the reason being narrowed down to its inability to find the git executable, which is supposed to be on the path. When I start a PowerShell and execute the thing…
26
votes
7 answers

Powershell call msbuild with nested quotation marks

Using Powershell and Psake to create package and deployment for a visual studio solution. Trying to deploy a database project using msbuild - which is working correctly using msdos visual studio command line msbuild /target:Deploy…
JohnF
  • 261
  • 1
  • 3
  • 3
18
votes
3 answers

psake vs. rake for .NET builds

I'm investigating build tools for use with an ASP.NET MVC 2 application. I like the idea of using a scripting language rather than XML, and have narrowed my choices down to psake or rake. I don't have much experience with Ruby or PowerShell, but am…
Todd Menier
  • 37,557
  • 17
  • 150
  • 173
17
votes
3 answers

Strange behavior with Powershell scriptblock variable scope and modules, any suggestions?

NOTE: I'm using PowerShell 2.0 on Windows Vista. I'm trying to add support for specifying build arguments to psake, but I've run into some strange PowerShell variable scoping behavior dealing specifically with calling functions that have been…
Matt Honeycutt
  • 1,009
  • 11
  • 16
15
votes
2 answers

Is there a way to list all tasks in a psake build file?

I've got a default.ps1 file with several tasks, some of which I don't use all too often. Instead of opening the file and grep'ing for the Tasks, is there a way to list them in the command line? Ideally with some description attached to them (that…
Bruno Lopes
  • 2,917
  • 1
  • 27
  • 38
14
votes
3 answers

How to execute NUnit test using NUnit.Runners package and psake?

Traditionally, nunit-console.exe has been included in the repository and on the build server (or any other machine) this EXE was called from some build script. Now that the NUnit.Runners package is available I wonder how this could be used from a…
Borek Bernard
  • 50,745
  • 59
  • 165
  • 240
13
votes
10 answers

Checking Visual Studio projects for consistency

You have a large Visual Studio Solution with dozens of project files in it. How would you verify that all the projects follow certain rules in their property settings, and enforce these rules if a new project is added. For example check that all…
orad
  • 15,272
  • 23
  • 77
  • 113
12
votes
3 answers

What is up with this PowerShell command line quoting/escaping?

I obviously don't know what I'm doing. I have finally got this PowerShell command to work. But I can't figure out why it works. My concern is the final "" characters: &"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" ` -verb:sync ` …
asgerhallas
  • 16,890
  • 6
  • 50
  • 68
12
votes
2 answers

Force MSBuild 14.0 in psake build for C# 6.0 code base

I recently updated to Visual Studio 2015 and am using the new C# 6.0 features. In VS, everything builds correctly. However, I use PSake as build script language, and the build always fails at places where I use c# 6.0 features. How can I tell…
theDmi
  • 17,546
  • 6
  • 71
  • 138
12
votes
1 answer

How do I call exec in psake to an executable with a variable path?

I can't seem to call this executable correctly in my psake deploy script. If I do this: exec { "$ArchiverOutputDir\NServiceBus.Host.exe /install" } It simply outputs this (and is clearly not calling the executable - just outputting the value of…
Josh Kodroff
  • 27,301
  • 27
  • 95
  • 148
11
votes
1 answer

Setting up PSake

Does anybody know or have a link to how I set up psake to run through powershell? I have absolutely no idea and I can find nothing to tell me.
dagda1
  • 26,856
  • 59
  • 237
  • 450
8
votes
1 answer

Psake and robocopy failing

Robocopy will exit with a code above 0 and still possibly not be a failure. PSake detects anything above 0 as a failure and fails the build. This is fine, but how come this still fails: task Deploy { robocopy $source $dest /NP /S /XO…
chum of chance
  • 6,200
  • 10
  • 46
  • 74
8
votes
1 answer

How to display msbuild errors on the overview page from TeamCity

I want to use PowerShell with Psake and TeamCity to configure my CI. I used to standard Msbuild runner but now I wrote my own script for building solution but I have problem when msbuild failed. When I was using Msbuild runner and build failed then…
Adam Łepkowski
  • 2,048
  • 1
  • 24
  • 41
7
votes
3 answers

How to publish web site using PSAKE

Is there a way to publish asp.net web application using PSAKE, just like visual studio do?
AlfeG
  • 1,475
  • 4
  • 18
  • 33
7
votes
2 answers

PSake extensions?

I recently discovered Powershell and through that PSake. If you are using it and you've extended it or created tasks for it, please share!
mmiika
  • 9,970
  • 5
  • 28
  • 34
1
2 3 4 5 6 7