I’ve defined a build in TFS 2010 with a drop location like “\server\BuildDrop\”. When I queue the build, it drops the build in something like “\server\BuildDrop\MyBuild\MyBuild_20120309.1”.
I’d like to be able to define a build that will drop at an exact location that never changes.
Can I change the build definition to always drop at a location like this?
1) \server\BuildDrop\MyBuild\
or
2) \server\BuildDrop\MyBuild\Latest\
If people want to know where to find the latest builds, I think it is best to educate them on where the drop location is and what the build names are so they can easily determine which one is the latest themselves. If you want to copy the output of the drop location to the same directory, you would have to create a custom template (by modifying the default template) that runs your build. During my build, after the files are copied to the drop location I execute a script to copy the files in the drop location to a common “Latest” directory. However, you can easily run into problems where people are accessing files in the “Latest” directory while you are running a build, and so your build fails because it cannot overwrite those files.
If you want to determine the drop location of the last successful build you can also do it programmatically. Below is a snippet of a custom activity I wrote to do just that:
If you are looking at customizing Team Build 2010 then I suggest reading Ewald Hoffman’s tutorials on the subject.