How can I copy files in the middle of a build in Team System?

Posted by Dana on Stack Overflow See other posts from Stack Overflow or by Dana
Published on 2009-11-10T18:32:21Z Indexed on 2010/04/13 16:03 UTC
Read the original article Hit count: 170

I have two solutions that I want to include in a build. Solution two requires the dll's from solution one to successfully build. Solution two has a Binaries folder where the dll's from solution one need to be copied before building Solution two.

I've been trying an AfterBuild Target, hoping that it would copy the items after the first SolutionToBuild, but it doesn't fire then. I'm guessing that it would probably fire after both solutions have compiled, but that's not what I want.

<SolutionToBuild Include="$(BuildProjectFolderPath)/../../Main/Framework.sln">
  <Targets>AfterCompileFramework</Targets>
  <Properties></Properties>
</SolutionToBuild>
<SolutionToBuild Include="$(BuildProjectFolderPath)/../../../Dashboard/Main/Dashboard.sln">
  <Targets></Targets>
  <Properties></Properties>
</SolutionToBuild>

<ItemGroup>
  <FrameworkBinaries Include="$(DropLocation)\$(BuildNumber)\Release\Framework.*.dll"/>
</ItemGroup>
<Message Text="FrameworkBinaries: @(FrameworkBinaries)" Importance="high"/>

<Copy SourceFiles="@(FrameworkBinaries)" DestinationFolder="$(BuildProjectFolderPath)/../../../Dashboard/Main/Binaries"/>

© Stack Overflow or respective owner

Related posts about team-system

Related posts about build-automation