2

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 to build a make target, such as a file, is only executed if any of the dependent files are newer than the target file?

I experimented with precondition and post condition, with limited success but this seems like a standard requirement and is in every UNIX style "make" I've used in the past. It feels like I am missing something obvious. Help!

user1383092
  • 507
  • 1
  • 7
  • 17

1 Answers1

3

As far as I know, Psake does not have such tools. The similar PowerShell build tool Invoke-Build does. You may try it if "incremental" tasks are important for your build scripts. See its wiki pages

Roman Kuzmin
  • 40,627
  • 11
  • 95
  • 117
  • That's very helpful - I'll try it out and see how capable it is. At first glance it looks good. – user1383092 Feb 09 '15 at 09:30
  • I've made good progress with this, and have moved my build over to Invoke-Build. Thanks for putting this together - very helpful. Of course I now have another question! http://stackoverflow.com/questions/28568879/how-to-create-dynamic-build-tasks-with-invoke-build-in-powershell – user1383092 Feb 17 '15 at 18:51