3

I'm using TFS Server 2013 preview to build my web app, and want to call a command line tool after the build.

I'd like to use the "post-build script path" property to do this, rather than customise the build template. It looks like exactly what I want.

The problem is that I don't seem to get anything from stdout or stderr in the build logs.

I've tried redirecting output to a file by adding " > log.txt" to the end of the arguments section but it doesn't help. I'm not sure it can help either, as it's not an argument to be passed into the command line tool.

Any ideas on how I can get the output from the command line?

Jonathan Nixon
  • 4,940
  • 5
  • 39
  • 53
Justin Caldicott
  • 739
  • 8
  • 22

2 Answers2

2

You need to look at the TFS web application to get the diagnostic log output. Full answer is here:

TFS 2013 default template run powershell script and log output

Community
  • 1
  • 1
Rob Cannon
  • 1,714
  • 3
  • 12
  • 14
0

The route I took was to customize my build. At the very end of the build xaml I added an InvokeProcess that runs a DOS Command. In the Invoke Process it has a Handle Standard Output which I entered stdOutput and a Handle Error Output to which I enetered errOutput. These outputs do end up on my log file.

I know you did not want to modify your build template but this mod is pretty benign and is easy to port over to a new template when MS updates them.

twamn
  • 676
  • 2
  • 6
  • 17
  • Thank you. I did end up modifying the build template and using InvokeProcess. I also needed to include additional activities to output messages and errors correctly. I've blogged about my experiences: http://thefutureofdeployment.com/calling-rgpublish-tfs/ – Justin Caldicott Nov 05 '13 at 16:49