tags:

views:

381

answers:

1

Hi,

I'm new to using TFS build. I've got a build defined that runs as a continuous integration. It creates a drop folder, but there's nothing in it.

What's the best practice for moving stuff in the drop folder? I've seen a Binaries folder, do I need to copy things into their, or do I alter the TFSbuild.proj in some way to copy the files I want to the drop folder?

Thanks.

A: 

I seemed to get it working by adding this near the end of my TFSBuild.proj

<Target Name="PackageBinaries">
    <ItemGroup>
        <FilesToDrop Include="$(SolutionRoot)\MyProduct\Installer\Bin\**\*.msi"/>
    </ItemGroup>
    <Message Text="FilesToDrop=@(FilesToDrop)"/>
    <Copy SourceFiles="@(FilesToDrop)"
      DestinationFiles="@(FilesToDrop ->'$(BinariesRoot)\%(RecursiveDir)%(Filename)%(Extension)')"/>
</Target>

It copies wanted msi files into the Binaries folder which the normal tfs build system then copies to the drop location. I noticed the Binaries folder gets deleted everytime a build is started, so you don’t have to worry about cleaning up.

The PackageBinaries target seems to be the standard target name that you can override for doing this kind of thing.

Scott Langham