One of the properties you specify when creating a new build definition is the build’s drop location. However, this isn’t a statically defined drop location (because if it was each build would overwrite the previous build).
Team Build 2008’s drop location algorithm took the drop location you specified and appended the build number. This generally worked fine except if you had two build definitions dropping to a single folder and you customized the build number generation algorithm to not include the build definition name in the build number.
To work around this Team Build 2010’s drop location algorithm appends both the build definition name and the build number to the drop location. This guarantees uniqueness in the path and will prevent builds overwriting each other and gives you an out-of-the-box solution that just works even if you customize the build number generation algorithm (which is easier in Team Build 2010 than it as in Team Build 2008).
The downside to this new algorithm is if you want to have complete control over the drop location’s structure. For example, lets say you have two build definitions MyApp_Main and MyApp_v1 configured to drop to \\builds\apps\MyApp, the default drop location algorithm will produce this structure:
If I want this (less redundant) structure instead that I’ll have to customize the build process template:
So let’s do that:
Basically all we’re doing in step #4 is removing the BuildDetail.BuildDefinition.Name directory from the drop location structure and trimming the build definition name (and trailing underscore) off the beginning of the final directory in the drop location structure. If you’ve customized your build number format you’ll need to modify this trimming algorithm to suit.