Determining cross-project dependencies

Hi,

We have share code libraries that are referenced across team projects but stored in the source tree under the project that originated them.

For example, say we have the following source tree:

$/
$/TeamProject1
$/TeamProject1/Solution1
$/TeamProject1/Solution1/ObjectModelLibrary1
$/TeamProject1/Solution1/ConsoleApp1
$/TeamProject2
$/TeamProject2/Solution2
$/TeamProject2/Solution2/ConsoleApp2
So TeamProject1 defined a C# class library called ObjectModelLibrary1, and now Solution2 is referencing that code in place. So from a workspace standpoint, Solution1 references ConsoleApp1 and ObjectModelLibrary1. Likewise, Solution2 references ConsoleApp2 and ObjectModelLibrary1.

So my question is how can I implement Continuous Integration builds properly here so that a CheckInEvent on ObjectModelLibrary1 triggers builds of both TeamProject1 and TeamProject2.

I already have CI working fine for a single project hierachy. I looked at CheckInEvent further to see how I might build this dependency tree up on receipt of a CheckInEvent but nothing is jumping out at me.

I am using http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/ConIntTmFndBld.asp as the basis of my CI implementation. The only thing I can think of is to crawl all the solution files at startup, build a team project dependency map from that, and trigger builds accordingly as CheckInEvent's are received.

Any more elegant approaches out there?

Thanks!

[1510 byte] By [Surly] at [2008-3-3]
# 1

Surly,

1) Is there a particular reason for you to have two different team projects? If you can have all the sources under one team project, things will be so simple.

2) Have you tried modifying the web.config file to have two entries ( in <appsettings>) for your teamproject1 and teamproject2?

ManishAgarwal at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Build Automation...
# 2

Are you using your own workspace to build multiple team projects. Manish has a blog on this topic here.

You will need to modify the sample to get what you want. One possible approach is to add another node in web.config that would list out the dependencies and what to build.This would mean that someone needs to maintain the dependencies list.

The other option as you mention is to look at the solution and projects and figure out what to build.

The checkinEvent would contain the changeset from which you can get the list of files that were changed. You would still need one of the mechanisms above to determine what to build based on the checkin event.

Thanks,

KishoreMN at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Build Automation...

Visual Studio Team System

Site Classified