6

The default configuration of the Team Build Number Format is:

$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)

It drops all output to \\foo\bar\MyBuildDef_20111031.1 Great stuff so far!

The small problem is that it drops all binaries in that directory without a good indication of the dependencies of the binaries.

TFS drop files

How can you modify this property, or otherwise, to have the solution's binaries dropped in their respective project directories?

In the case above, I had expected the MVC website (complete with its bin directory) to be dropped. Instead, we got that PLUS the extra drop of the binaries in the root.

In other words: TFS, please stop dropping all binaries in the root; it looks messy, and it's confusing on which files belong/associated with what.

How can this be achieved with Team Build 2010?

p.campbell
  • 98,673
  • 67
  • 256
  • 322

2 Answers2

7

This blog post should help you out: http://blogs.msdn.com/b/willbar/archive/2011/02/05/splitting-team-build-outputs-into-folders.aspx

Essentially, you create a new 'Platform' for each project. Team Build will put each platform in a different directory by default, so you get a different directory for each of your projects.

Build configuration dialog:

Build Configuration dialog

Drop folder output: Build drop folder with separate folders

granth
  • 8,919
  • 1
  • 43
  • 60
  • I used this idea for one of my NServiceBus solutions. Now, each project in my solution builds and the associated binaries are copied into corresponding team foundation server build folders. This enables me to keep multiple projects that use NServiceBusHost.exe to host a service endpoint in the same solution. This post saved me hours of time looking for a solution. Thanks! – EnLaCucha Apr 11 '13 at 19:47
  • Nothing against the author of this answer that links to the MSDN blog. But this answer is absolutely nuts. I can't believe the MSDN blog author would suggest we go to this much trouble. There must be a better way. – Andrew Arnott Feb 28 '15 at 01:01
3

Unfortunately I have not found a good way to do this yet, though it has been a while since I tried to find a better solution then what I settled on.

Current have solutions for each desktop application, and one with all the websites. I then followed the instructions here to make each solution output into a separate folder.

Ian Oakes
  • 10,153
  • 6
  • 36
  • 47
Sean Lynch
  • 1,604
  • 19
  • 29
  • Changing the build process template is indeed a much better solution than adding a large number of different build configurations. Especially if you want your build server to generate both a debug and a release build of your code or if you later need to support multiple platforms. – jessehouwing Apr 26 '12 at 19:09