Jakob Ehn

Visual Studio ALM MVP @Inmeta Crayon
posts - 45, comments - 240, trackbacks - 0

My Links

News

Microsoft Community Contributor Award 2011

Twitter





Tag Cloud

Archives

Post Categories

Blogs

TFS Team Build 2010: How to place the build output to a fixed location

By default, TFS Team Build creates a new folder in the drop location for every build. I have seen request from people that wonder how to always have team build put the output in the same folder every time, effectively overwriting the results from the last build. This is easy to accomplish by adding an activity that copies the drop folder to a fixed location.

To copy the result of the build to a fixed location, you need to modify the build process template:

  1. Open the build process template XAML file in the workflow designer.
  2. Click on the Collapse All link in the upper right corner so that only the top level activities are shown
  3. Open the Toolbox window and locate the CopyDirectory activity (it is located in the Team Foundation Build Activities tab)
  4. Drag the CopyDirectory activity onto the design surface and drop it between the Run On Agent and the Check In Gated Changes for CheckInShelveset Builds activity:

    image  
  5. Right click on the CopyDirectory activity and select Properties. Fill out the properties, you will of course need to modify the path for the destination accordingly:

    image
  6. Save the build definition and check it in. NB: Remember to check in the build process template file after modifying it, a lot of times people forget this step!
  7. Queue a new build and, after the build has succeeded, verify that the build output has been copied to the corresponding output path

To make this build process template more generic, you proabably want to create a process parameter that lets you define the path either when you create a new build definition, or when you queue the build (or both). This will let you you reuse the build process template for builds with different output paths

Print | posted on Wednesday, September 01, 2010 8:47 AM | Filed Under [ TFS Team Build VSTS 2010 ]

Feedback

Gravatar

# re: TFS Team Build 2010: How to place the build output to a fixed location

I am getting "Access Denied" errors using this CopyDirectory task. Essentially the task is unable to write to the other server in my case. Is this a result of the TFSBuildServiceHost running under 'Network Service' account? What security settings are required on the \\ServerPath\SomeShare folder?
11/11/2010 11:05 AM | Tim
Gravatar

# re: TFS Team Build 2010: How to place the build output to a fixed location

You must give the build service account permission to write to the share. Normal Write/Modify ACL permissions is enough
11/14/2010 2:42 AM | Jakob Ehn
Gravatar

# re: TFS Team Build 2010: How to place the build output to a fixed location

Thanks. Exactly what I was looking for. :)
2/8/2011 9:08 AM | tikra
Gravatar

# re: TFS Team Build 2010: How to place the build output (All dll's and some files) to a DROP LOCATION

We are using WIX which creats an MSI cabinate that contains all dll's and files that copies to DROP Location. Now my need is to copy the same content of the MSI file to the drop location (Not as a cabinate) when the build get succeded.

Any help wolud be appriciated..
Thanks in Advance. :)
3/25/2011 9:10 AM | shamsheer
Gravatar

# re: TFS Team Build 2010: How to place the build output to a fixed location

It was very well laid out and helpful. Thanks Jakob!
5/2/2011 5:57 PM | gout symptoms
Gravatar

# re: TFS Team Build 2010: How to place the build output to a fixed location

I tried this, but did not work, only log file was available at the drop location I specified, the buildversionlabel.xml file was in C:\Builds\5\product\product_Nightly\Sources\A3\Common\Components\RemoteServer\Source\A3.Common.Components.RemoteServer
9/6/2011 2:59 PM | Ananya
Gravatar

# re: TFS Team Build 2010: How to place the build output to a fixed location

You are the man! Was looking for some guidance on this, where can I get better build guidance than here :)
Worked for us!!!
3/20/2012 10:07 PM | Naveen Sharma
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: