-->

TFS Build vNext - copy all assemblies to one folde

2019-08-08 08:25发布

问题:

This question already has an answer here:

  • TFS 2015 Publish Build Artifacts in one directory 3 answers

my first impression of the vNext was very good. Everything seems simple and straightforward. Now I just want to get a simple thing done and it gets complicated? I have a simple build definition which contains the Visual Studio Build. After the build is done i would like to copy all files from bin folders to one folder on a network share. With a xaml build definition this was already the default behavior if you set copy build output to \\myserver\share. Now with the default Copy and Publish Build Artifacts everything gets copied in a separate folder for each project. Like

\\\myserver\\share\...\drop
    + MyProject1\bin\
    + MyProject2\bin\

but i want all assemblies in

\\\myserver\\share\...\drop

How can i achieve this (as simple as possible).

回答1:

You can add several steps to copy the assemblies (One step for one project) and specify the copy root in the step. Refer to my answer in this question for details: Copy one file in target directory on deploy from visual studio team services