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

Setting a Property Value in 1 task and use the updated value in another

In my psake build script, I have a property called $build_mode that I set to "Release". I have 2 tasks; "Compile_Debug", "Compile_Release". In Compile_Debug, I change $build_mode to "Debug" and it works fine while that task executes; however, if I…
JamesEggers
  • 12,885
  • 14
  • 59
  • 86
3
votes
1 answer

psake calling msdeploy.cmd with parameter containing an ampersand

I have a psake script to manage my deployments, the process is as follows: Compile & run tests Generate a deployment package using msbuild Check to see if we are deploying internally or externally If internal, execute the generated cmd file if…
nachojammers
  • 1,225
  • 1
  • 10
  • 12
3
votes
2 answers

TeamCity + Psake + SqlCmd Powershell infinite loop

I'm trying to use the Powershell Runner in TeamCity 6.5.2 to run a Psake task that depends on a task that calls out to SqlCmd. If I try to do this, teamcity seems to get into an infinite loop until it eventually times out or errors out. I'm…
Mark Boltuc
  • 3,487
  • 1
  • 27
  • 26
3
votes
1 answer

What is Psake used for?

Buliding the C# solution or Build automation script ..If its for Building the solution why it has to use MSbuild for it.. And clean will also be scripted in it intially
satish
  • 2,425
  • 3
  • 23
  • 40
3
votes
1 answer

MSBuild always build all platforms even when specific one provided

Any ideas as to why MSBuild is always building all my platforms for my UWP solution even though I'm specifying to only build for the ARM platform. This is the command line I'm using: MSBuild.exe C:\MyApp\MyApp.sln /p:Configuration=Release…
Thierry
  • 6,142
  • 13
  • 66
  • 117
3
votes
0 answers

Can psake ignore dependent tasks?

In PSake, is there an option to request that dependent tasks are not not run. For example: In a build script, Build.ps1: Task T1 {} Task T2 -depends T1 {} Is it possible to do Invoke-psake .\Build.ps1 T2 -ignoredependencies? The reason for…
3
votes
1 answer

Error reporting in psake

How do I get notified of any errors in any of the tasks in psake task list.? In the notification handler, I would like to show a window notification that the task failed. But psake swallows the exception and writes it to the console. Update: Here is…
Rockstart
  • 2,337
  • 5
  • 30
  • 59
3
votes
1 answer

Psake Include method not working

I am writing a simple PS script with Psake and I have a problem when I try to include another ps1 file. PS C:\CI> Include .\EnvSettings.ps1 I have this exception Exception calling "Peek" with "0" argument(s): "Stack empty." At…
JuChom
  • 5,717
  • 5
  • 45
  • 78
3
votes
4 answers

Determine If Solution Compiles using MSBuild and PSake

I have put together a PSake (v2.0) build script, and the script is setting the $psake.build_success property as true even thought the call to MSBuild fails. Can anyone advise me on how to alter the script so that the $psake.build_success property…
Tangiest
  • 43,737
  • 24
  • 82
  • 113
3
votes
3 answers

How to execute a .bat file from psake?

I am trying in a powershell psake script to execute a .bat file. Is this possible? Or do I have to do a workaround?
Jan-Terje Sørensen
  • 14,468
  • 8
  • 37
  • 37
2
votes
5 answers

How do I escape a directory correctly when using psake, exec, and msbuild?

I can execute the following command in PowerShell: msbuild "c:\some\spaced path\project.sln" /p:MvcBuildViews=False /p:OutDir="c:\\some\\spaced path\\deploy\\Package\\" The paths are changed, but the real ones also contain a spaced component. The…
Matthew Flaschen
  • 278,309
  • 50
  • 514
  • 539
2
votes
1 answer

Cannot import module from Powershell script using Jenkins

I am trying to use Psake to build my Asp.Net MVC Solution on Jenkins Server. I have the Powershell scripts and Psake scripts checked in to source code. I have created a bootstrapper file build.ps1 that imports and invokes Psake. Import-Module…
Afraz Ali
  • 2,672
  • 2
  • 27
  • 47
2
votes
0 answers

Calling specific version of MSBuild within psake script

I am trying to compile the code for my MVC application via MSBuild.exe. I was getting errors before, but thanks to this answer, I know what the issue is. I was using the wrong version of MSBuild.exe Now that I know what version I should be using, my…
J86
  • 14,345
  • 47
  • 130
  • 228
2
votes
1 answer

How to run postaction if failure occurs in psake?

In our psake script , prior to compile we are running check-out assembly files . when compilation task is successfully done the assemblies will be copied then Check-in task will commit the assemblies. Problem with this approach is if compilation…
Samselvaprabu
  • 16,830
  • 32
  • 144
  • 230
2
votes
1 answer

PowerShell - psake run clean up script after all tasks?

Is there a hook in psake to run a clean up block after ALL talks (not just per task)? Thanks
Jeff
  • 35,755
  • 15
  • 108
  • 220