I have installed TFS2010 Beta 2 with default se开发者_如何学运维ttings and configured a CI build with a solution containing the indivial projects.
My *.cspoj files could have:
<OutputPath>bin\debug\</OutputPath>
Or alternatively:
<OutDir>bin\debug\</OutDir>
When the build server is done building and running tests etc. all the assemblies are placed in the root of the build drop off folder.
How do I configure the build to keep the outputpath or outdir in my projects and store the assemblies and content in the matching folder structure( builddropfolder\bin\debug\ )?
I have found a number of post on this most of them relates to TFS 2008 but I have not found solutions for TFS 2010.
Perhaps it is possible to solve this in the new workflow file for the buildserver?
Accepted answer (from the blog) requires modifying project files to cope with desired behavior. But if you just want TFS Build not to change OutputPath of your projects, then
Edit build template (best to create your own custom template based on default and use it in your build configuration).
Find <mtbwa:MSBuild /> entry (there are more than 1 in the template) responsible for compiling project - should be in "Compile the Project" sequence.
Set OutDir argument to empty.
Save & check-in changes.
Works on TFS 2012 but may also apply to other version.
The following blogpost answered my question.
Link
Many thanks to Jim Lamb for providing a solution.
This is a known issue with TFS. I don't think it's specific to 2010, although I've heard that they were working on fixing it.
Take a look at this post:
What's the best way to get TFS to output each project to its own directory?
It's boils down to a couple different ways to solve it, but essentially I think you'll need to tweak it in the TFS build script.
精彩评论