This project is read-only.

Refactor existing activities into PowerShell scripts?

Oct 17, 2013 at 4:59 PM
Hi, with the release of TFS 2013 I believe the new recommended best practice by Microsoft (I may be wrong about that) is to use PowerShell scripts for all of the Pre-Build, Post-Build, Pre-Test, and Post-Test steps, rather than workflow activities. This makes sense to me as every time our company has upgraded TFS versions we've always had issues getting our build templates to work since we have customized them.

Are there any plans to rewrite the existing build activities as PowerShell scripts? I don't believe this would be too hard, but it would be a little tedious. I personally prefer PowerShell over the Visual Workflow language, and as mentioned it would make upgrades smoother since the actual build templates would have minimal customizations made to them.
Oct 18, 2013 at 3:20 PM
The upgrade story should be better with 2013. These new extension points mean you can hopefully steer clear of editing the templates altogether. Andy Lewis from MS recently joined this project and you may have noticed that we've recently added a Scripts folder to the sourcecode. We expect / hope that this will grow into a library of re-usable scripts. Andy has a great landing page for customizing builds here.

There will be times when you do need to edit your template and nothing has changed there; you can still choose to use an activity or call any script you may have written.

There is no plan to rewrite all the activities, though this may happen over time as we try and grow the Scripts library. I share your preference for PowerShell, in some complex scenarios I still find that the fastest (sometimes best) solution is to use the upgrade template where it is simple to customize the process and you have a wealth of MSBuild activities to do pretty much anything you want.

Does that help answer your question?

Mike
Marked as answer by deadlydog on 10/18/2013 at 11:13 AM
Oct 18, 2013 at 7:13 PM
Yup, thanks for the clarification :)