index > Team Foundation Server - Build Automation > Create separate drop folder for each solution

Create separate drop folder for each solution


I have an integration build that builds all my solutions (about 15 of them). I'd like to have my build drop the assemblies for each solution into it's own directory rather than dropping all the assemblies into one directory. So I'm looking for something like this:

Integration\Binaries\Solution1
Assembly1.dll
Assembly2.dll
Assembly3.dll

Integration\Binaries\Solution2
Assembly4.dll
Assembly5.dll
Assembly6.dll

Integration\Binaries\Solution3
Assembly1.dll
Assembly3.dll
Assembly6.dll

Esteban Garcia

This is a non-trivial task with the current targets file, unfortunately.

You'll need to set the SkipDropBuild property to true (to skip the standard dropping of binaries) and then override the AfterDropBuild target to do what you are looking for.  You'll want to copy the binaries from their intermediate directories (e.g. <solution directory>\obj\debug) rather than their output directories, since you won't be able to distinguish which assemblies came from which solutions there. 

You'll want to batch over the SolutionToBuild collection in some way, but it may be a bit tricky.  You'll need something like this:

 <Target Name="AfterDropBuild">

    <CreateItem Include="%(SolutionToBuild.RootDir)%(SolutionToBuild.Directory)\**\*.dll;%(SolutionToBuild.RootDir)%(SolutionToBuild.Directory)\**\*.exe" AdditionalMetadata="SolutionName=%(SolutionToBuild.Filename)">

        <Output ItemName="FilesToCopy" TaskParameter="Include" />

    </CreateItem>

    <Copy SourceFiles="@(FilesToCopy)" DestinationFiles="@(FilesToCopy ->'$(DropLocation)\$(BuildNumber)\Integration\Binaries\%(SolutionName)\%(RecursiveDir)%(Filename)%(Extension)')" />

</Target>

You'll need to include whatever other extensions you care about in the Include list.

-Aaron




http://blogs.msdn.com/aaronhallberg
Aaron Hallberg
reply 2

You can use google to search for other answers

 

More Articles

TF53010 - The build request is not from the configured Team Found...
Building BizTalk 2006 Project on TFS
Error: The "CreateWorkspaceTask" task failed unexpected...
Building project which referring dlls from other project
Team Build and Test Config Deployment Item Issue
Displaying build status
Web Tests during build fails Http 404 from website
Change Project Build Order
BUG: Serialization of Project type does not include ProjectConfig...
help link - nightly builds
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Listing all files that changed between b…
Canceling/Overriding UpdateBuildNumberDr…
TFSBuild.proj ItemGroup's, AdditionalRef…
TF42056: The build service could not con…
Problem building Setup Projects with Tea…
Build failed because of long path - over…
Test coverage analysis report viewing
Build failing - write permission problem.
"Missing file" link error with…
Can I get Team Build to run custom task,…
Team Build that performs builds from 2 p…
Manipulating call to AspNetCompiler in T…
Directory Structure - Best Practices Que…
Copying Files for Team Foundation Build
Specify Parameters on Build Initiation f…

Hot Articles

Storing Common Data Between Build Types
Is there a way to automate getting lates…
Keying off an event
Best Practice for Exception Management i…
Customizing Team Build
Traffic to the teamsystem server after a…
get tfs build types from api
Interaction with Visual Studio Team Buil…
Personalization of Team System - Pending…
SkipCompile?
vsprops not overriding output directory
Generating Build Reports
Build and Publish Problem
Team Build --- Run build and items built…
Print build summary?

Recommend Articles

Getting list of fixed bugs with each bui…
DLL's build on TFS is different and inco…
Test coverage analysis report viewing
What machine is more practice to generat…
Team Foundation Server Build Process
error MSB3202
Unsubscribe an event.
Display custom build steps in VS Team Bu…
Assembly with Web Service is created dif…
New Build Type\Build Options\Run Test pr…
Test results: No test resutls
Problem checking out binaries
More Continuous Integration problems
Undefined variable in TFS Build (MSB4102)
Build server output folder