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"/>
<Output TaskParameter="Value" PropertyName="DropLocation" />
If you are wondering what ShowBuildStep is, take a look at this post…FTD