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
2
votes
2 answers

Converting Dos Command to Power Shell command

I am working with PowerShell 2.0 with Psake 1.4 Here is the dos command that is running that I want to convert to PowerShell. "C:\Program Files\Borland\StarTeam 2005 R2\stcmd.exe" co -p "rubble.barney:dinno@HostName:4455/MySolution/WebApp" -is -fp…
Razcer
  • 394
  • 4
  • 17
2
votes
1 answer

How to create dynamic build tasks with Invoke-Build in PowerShell

Using Invoke-Build I am trying to create dynamic build tasks, an example of the approach is below. Where, in a similar fashion to the classic UNIX make facility an output file will be generated for each input file iff the input file is newer than…
user1383092
  • 507
  • 1
  • 7
  • 17
2
votes
1 answer

Can file time stamps be used to define dependencies in Psake PowerShell makefiles?

From what I have seen Psake domain specific PowerShell scripts do not evaluate if dependent objects really need to be built - instead the dependent objects are always evaluated in order. Is there a way to implement dependencies so that the script…
user1383092
  • 507
  • 1
  • 7
  • 17
2
votes
2 answers

Getting the current directory where the script is executed as opposed to the current executing directory of the script

I want to get the current directory where the script is executed as opposed to the current executing directory of the script. The script lives in 'd:\projects\code\development.tools' and I want the directory of the project that lives in…
iam3yal
  • 2,188
  • 4
  • 35
  • 44
2
votes
1 answer

Psake - Running same task multiple times

I'm creating a build/deploy script for our website. Our process currently is a bit convoluted as it requires to start website with a webconfig setup to update our schema. Then we switch off the site, change webconfig not to update schema anymore and…
Luke
  • 1,872
  • 20
  • 31
2
votes
1 answer

CSPack and CSRun for running site in azure emulator from powershell

I have spend some time trying to get the cspack and csrun command working to run a website locally in the azure emulator. So far this is what I get, but its not working I use psake Task StartAzureEmulator { & 'C:\Program Files\Microsoft…
khebbie
  • 2,490
  • 3
  • 31
  • 53
2
votes
2 answers

Psake, Powershell & Wix

I have the below function as a part of my psake build. When the build is executing Candle.exe throws this error: candle.exe : warning CNDL1098: 'ext .\Build\Packages\WixWeb\bin\WixIIsExtension.dll' is not a valid command line argument. I think this…
NotMyself
  • 29,209
  • 17
  • 56
  • 74
2
votes
1 answer

TeamCity not showing service messages with powershell

I'm running a project configuration using powershell/psake and I'm using the TeamCity powershell module (https://github.com/JamesKovacs/psake-contrib/wiki/teamcity.psm1) yet TeamCity only shows the configuration as "Running" However, the build log…
Ryan Tomlinson
  • 874
  • 2
  • 9
  • 21
2
votes
1 answer

CS0246 and CS0433 errors when building .NET 4.0 website on Server 2012

I am building a .Net 4.0 web project on Server 2012 with .Net 4.5 installed. I am using Psake under TeamCity and am getting CS0246 saying NotMapped could not be found, along with CS0433 saying it has found two DLLs for DataAnnotations. The class…
Sean Kearon
  • 10,987
  • 13
  • 77
  • 93
2
votes
2 answers

How do I capture git error message in powershell?

I am writing a psake script. One of the tasks pulls files from a Github-hosted repository: Framework "4.0" $ErrorActionPreference = "stop" formatTaskName "`n##------ {0} ------##`n" task DeployToLocalDevelopmentEnvironment { # other commands …
Arnold Zokas
  • 8,306
  • 6
  • 50
  • 76
2
votes
0 answers

Can I dynamically create psake tasks?

Is it possible to dynamically create psake tasks based on configuration (much as rake does)? For example, given a hashtable of environments: environments { $dev = 'server1', $uat= 'server2' } I'd like tasks deploy.db.dev, deploy.db.uat,…
Joe
  • 333
  • 3
  • 10
1
vote
1 answer

Error passing Parameters with PSake 4.1.0

I'm trying to utilize the parameter feature introduced in the v4 release, but I'm running into an error. I can only seem to get properties to work...and I have tried passing the parameters using single quotes and double quotes around both. I used…
Danny Douglass
  • 390
  • 1
  • 11
1
vote
1 answer

psake msbuild error

I want to build my solution using psake and msbuild (v3.5) on an x64 pc. When I execute the script I get the following error: error MSB4019: The imported project "C:\Program…
crauscher
  • 6,528
  • 14
  • 59
  • 85
1
vote
1 answer

How do you clean up NUnit processes with Psake?

I have a Psake script that works great locally. It runs great; however, Nunit spins up nunit-agent.exe processes and will not dispose of them. This isn't an issue locally since I am not pulling down fresh copies of my repository (which contains…
JamesEggers
  • 12,885
  • 14
  • 59
  • 86
1
vote
1 answer

Build Visual Studio 2003 solution or .NET 1.1 projects with psake

Unfortunately, I have mixed .NET version projects. Some legacy code is in .NET 1.1 and other is in .NET 3.5. I cannot use exec { msbuild test.sln } because msbuild does not support compiling .NET 1.1 solution. How can I build .NET 1.1 solutions…
Andrew Chaa
  • 6,120
  • 2
  • 45
  • 33