CeejeeB
CeejeeB

Reputation: 3114

TFS 2010 Working Folders Setup in a Build

I have a folder structure setup for my code like so:

MyCodeFolder
   -SolutionFileOne.sln
   -ProjectFolder1
   -ProjectFolder2
   -ProjectFolder3
   -SolutionFileTwo.sln
   -ProjectFolderA
   -ProjectFolderB
   -ProjectFolderC
   -ProjectFolderCommon

Solution one contains projects 1,2,3 and Common and Solution two contains project A, B ,C and Common.

When I come to create my TFS Builds I am getting a problem. If I just add MyCodeFolder in the working folder set up then both builds will succeed but then check-ins against project 2 will kick off a build of solution two and vice versa.

If I map only the folders the solution needs the build fails, which I am guessing is down to the fact I haven't included a mapping to the folder where the solution file is (the MyCodeFolder).

Is there a way I can solve this issue without altering my file structure?

Upvotes: 0

Views: 475

Answers (1)

Derek Evermore
Derek Evermore

Reputation: 1418

The continuous integration trigger in TFS builds will queue a new build any time an item within that build's workspace is altered. Workspace mappings can only contain folders - you cannot include \ exclude (aka "cloak") individual files within folders.

What you can do is setup your build workspace to use the entire /MyCodeFolder folder. Then, in the build for SolutionFileOne.sln you can cloak ProjectFolderA, ProjectFolderB, and ProjectFolderC. In the build for SolutionFileTwo.sln you can cloak ProjectFolder1, ProjectFolder2, and ProjectFolder3.

This is only a partial solution. Both builds will still get kicked off when someone changes either solution file, or when anything in the ProjectFolderCommon folder is changed. Since you can't cloak the solution files themselves there's no way to avoid both builds getting kicked off on a solution file check-in without changing the structure of your files.

Upvotes: 2

Related Questions