Is it possible to just copy the contents of a folder from CVS?

Hi There,

I have been tasked with building a CI solution for our application. Have no previous in doing this as we have been building manually using VSS.

Our code is held in CVS has six folders. Let us say they are called.....


Now folder 'A' contains our cshapre solution(sln) and 'B', 'C', 'D 'and 'E' contain common code used by 'A' for the build. Folder F contains 2 flash files used by folder 'B'. I have no idea why it is set-up like this I am just tasked with getting the CI solution up and running.

I have set up Team City to copy over folder 'B' then 'C' then 'D' then 'E' and have their csproj file name in the Build Path Name in step 3, the Build step. The runner type in this step is MSBUILD. Then I copy over folder 'A ' and in step 3 it has its solution file as the build path name.

When I ran the steps above my build failed because I was missing folder 'F' and it's two files. So I manually created them and coped the two files over by hand, as I cannot get TeamCity just to copy these two files over. Can someone tell me is there a way to just add a step to just COPY over these two files into a folder and not have to run the build step?

Thanks very much.


Comment actions Permalink

Create an MSBuild script for this and then have it as the first build step

something as follows:

<Target Name="Name>
 <Message Text="Copying of Folder F" />
 <PackagedFiles Include="<Path to folder F>\**\*.*" />
 <Copy   SourceFiles="@(PackagedFiles)"
 DestinationFiles="@(PackagedFiles->'<New location for Folder F to go to>\%(RecursiveDir)%(Filename)%(Extension)')"/>
 <Message Text="Copy Complete" />

Comment actions Permalink


I don't think copying the sources during the build is a reliable solution.

Look at checkout rules, they allow to remap sources into different directories automatically before a build is started.

Also, if your project relies on some shared libraries, it's better to build these libraries separately by dedicated build configurations, publish the resulted binaries as build artifacts, and reuse them in other build configurations with artifact dependencies.


Comment actions Permalink

Thanks. I will investigate these.


Please sign in to leave a comment.