TFS Team Build DropLocation

I’m running multiple build servers and want drops to go to the relevant build server rather than a central drop folder. The TFSBuild.proj file has a property called DropLocation that specifies where to drop build output. I decided to add a property to the value of DropLocation to make the build drop locally:


Easy enough, but running a build resulted in:

TF42042: Failed to connect to drop location \\$(COMPUTERNAME)\drops please ensure that is is a valid share.

It’s not the $, using %24 gives the ‘same’ message. It looks like the build process is using EvaluatedProperties.Value rather than FinalValue.

Luckily there is a way to get around this small bug. I overrode BeforeEndToEndIteration and set DropLocation in there:

<Target Name="BeforeEndToEndIteration" Condition="’$(IsDesktopBuild)’!=’true’">
<ShowBuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildURI="$(BuildUri)" BuildStep="TARGET OVERRIDE: BeforeEndToEndIteration"/>
<CreateProperty Value="\\$(COMPUTERNAME)\drops\CI—ProductXYZ">
<Output TaskParameter="Value" PropertyName="DropLocation" />

If you are wondering what ShowBuildStep is, take a look at this post…FTD

This entry was posted in Team Foundation Server. Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s