views:

981

answers:

2

Is it possible to copy a directory in a team build target?

+1  A: 

I've found the easiest way (if you want to be a bit more stringent about what to include/ exclude) is with some custom MSBuild tasks I've written: http://www.aaron-powell.com/blog.aspx?cat=AaronPowell.MSBuild.Tasks

You provide a source directory, a destination direction (support for network shares is provided) and file names/ extensions to exclude.

It's mainly because Team Build makes a real mess (particularly with web apps) when it run and it's not really possible to use the standard MSBuild copy tasks.

Slace
+2  A: 
<Copy SourceFiles="@(SourceItemGroup)" DestinationFolder="$(YourDir\SubDir\%(RecursiveDir)" />
Adam Fyles