It's very common that someone will want to create a build Item that is expected to consists of the output files, such as those in OUTDIR or DropLocation, and then at some point near the end of the script using that Item in for copying those files to some other location. Commonly people find that they ended up with an empty directory at this new target location and are a bit perplexed as to why.

This script should wok for you. See the source section below for a more detailed description and additional references including a bit of sample code often seen that people use that doesn't work as expected.


Add to TFSBuild.proj as an override of the AfterGet target


Micael Ruminer's blog entry among likely countless other locations contains this information


   <Target Name="AfterDropBuild">
      <!-- I just do the below as a matter of form and practice for easier maintenance if the property is referred to in multiple locations in this target -->
                 PropertyName ="MyDropLocation"/>
      <!-- notice I also don't use *.* in the include but * so that I pick up any files without an extension as well - this may or may not be what you desire-->
                 TaskParameter ="Include"
                 ItemName ="MyDropFiles"/>

Last edited Nov 2, 2010 at 6:14 PM by wbarthol, version 2


No comments yet.