Override default drop location for each solution in build
- Is it possible to copy the output binaries of a solution to a different location than just
..\[buildname]_[date].[iteration]\Release
This makes it hard for me to package all of our software into a package since we have seperation for each of our applications.
Is there a way that I could force the build project to copy the binary files to something like
..\[buildname]_[date].[iteration]\[solutionname]
as this would make it much easier for me to get at each seperate product. If this can not be done, what else have people tried to get the same effect?
Thanks for your responses.
Answers
This is a non-trivial task, unfortunately. You would need to override the CoreDropBuild target in your TfsBuild.proj file(s). The drop location is actually:
$(DropLocation)\$(BuildNumber)\<recursive copy of everything under $(BinariesRoot)>
Your desired change, then, really comes down to modifying the directory structure under $(BinariesRoot). This directory structure is created within the CoreCompile target. CoreCompile, however, is not really set up to allow the extraction of individual solution names - it builds all solutions at once via a single <MSBuild> task. One possibility, then, would be to override CoreCompile such that it iterates over solutions, rather than building them all at once. Each invocation of a solution-specific <MSBuild> target could then include the solution name in its output directory.
A simpler approach would be to create different build types for each of your solutions. This wouldn't do exactly what you are looking for, but would give you a similar result.
-Aaron
All Replies
This is a non-trivial task, unfortunately. You would need to override the CoreDropBuild target in your TfsBuild.proj file(s). The drop location is actually:
$(DropLocation)\$(BuildNumber)\<recursive copy of everything under $(BinariesRoot)>
Your desired change, then, really comes down to modifying the directory structure under $(BinariesRoot). This directory structure is created within the CoreCompile target. CoreCompile, however, is not really set up to allow the extraction of individual solution names - it builds all solutions at once via a single <MSBuild> task. One possibility, then, would be to override CoreCompile such that it iterates over solutions, rather than building them all at once. Each invocation of a solution-specific <MSBuild> target could then include the solution name in its output directory.
A simpler approach would be to create different build types for each of your solutions. This wouldn't do exactly what you are looking for, but would give you a similar result.
-Aaron
- Thanks for your response, it was very helpful. Do you have any code examples of overriding the CoreCompile target to iterate over each solution to build?Thanks again.
If you couldn't tell from my last post, overriding CoreCompile would not be my first choice for solving your problem. Microsoft.TeamFoundation.Build.targets will almost certainly be changing at some point in a future release, and if you override big sections of it you will run into trouble when this happens.
Having said that, the following blog entry should point you in the right direction.
http://blogs.msdn.com/manishagarwal/archive/2006/05/09/593510.aspx
-Aaron
- Thanks Aaron,
I am going to create a MSBuild Project for each application we have.

