tags:

views:

22

answers:

0

I want to redefine the way TF Build Service, creates folders for each build (one folder for each build). I have overridden CoreDropBuild and CopyLogFiles targets. It copies the binaries to the new location that I want but the log files will be copied to the default location still.

<Target Name="CoreDropBuild"
    Condition=" '$(SkipDropBuild)'!='true' "
    DependsOnTargets="$(CoreDropBuildDependsOn)" >

    <CreateItem Include="$(BinariesRoot)\**\*.*" >
      <Output ItemName="FilesToCopy" TaskParameter="Include" />
    </CreateItem>

    <Copy
          SourceFiles="@(FilesToCopy)"
          DestinationFiles="@(FilesToCopy ->'$(DropLocation)\%(RecursiveDir)%(Filename)%(Extension)')"
          ContinueOnError="true" />

</Target>

<Target Name="CopyLogFiles" Condition=" '$(SkipDropBuild)'!='true' " >
    <CreateItem
         Include="$(MSBuildProjectDirectory)\*.txt"
         Exclude="$(MSBuildProjectDirectory)\BuildLog.txt" >
      <Output ItemName="LogFilesToCopy" TaskParameter="Include" />
    </CreateItem>

    <Copy
         SourceFiles="@(LogFilesToCopy)"
         DestinationFiles="@(LogFilesToCopy ->'$(DropLocation)\%(Filename).txt')"
         SkipUnchangedFiles="true"
         ContinueOnError="true" />
</Target>