visual-studio-2013build-definitionauto-build

How to use default project output locations in TFS 2013 build definition?


I have a solution which has several VC++ projects. I am trying to make TFS do weekly builds. I have set up TFS Build controller and agent. I created a build definition using DefaultTemplate.xaml file and I can successfully build some of the projects.

The problem is my projects depend on some libraries that are already checked in to debug/release folders. TFS is trying to put project outputs (dlls and exes) to $(SolutionDir)\Binaries directory. Since dependent libraries don't exist on this location, TFS build fails.

What I would like to do is use my own project output locations and somehow copy the output files to somewhere in server.

How can I do that?

Thanks


Solution

    1. It's not recommended checking in the libraries to TFS, you can use Nuget to restore the packages.

    2. For the build outputs, you can specify the drop folder in your build definition and copy the outputs to the drop folder.

    enter image description here

    1. You can also check in a script that copy the outputs, and specify a post-build script path in your XAML build definition. This script gathers some of the typical binary types from the typical locations and copies them to the folder from which TFBuild copies and drops to your staging location. Check more information about Run a script in your XAML build process at website: https://msdn.microsoft.com/library/dn376353%28v=vs.120%29.aspx