We have found that this is the best way to keep our project's self-contained, we use svn: externals to bring in external projects as dependencies.

We have set up a Dependency Trigger so that when Project Common is built then it triggers a build of Project A and B.

Our checkout settings are as follows: Automatically on Agent and a blank checkout directory.

So, when Project Common builds then it starts the build of Project A. But the problem is that Project A is considered a completely fresh build, so it cannot reference the previously built Project Common assemblies. For example:

Project Common builds to C:\Program Files\TeamCity\eefbdc179805b02e\ProjectCommon\bin

Project A builds to C:\Program Files\TeamCity\a5080f812a9a9dbd\ProjectA

So you can see when Project A goes to reference ..\TestAssemblyCommon\bin it won't find it as it hasn't been built in that configuration!

The way I can see to workaround this problem is for our NANT scripts to always build Common when building A and B.... even though this would be a waste of time.

What would be really nice to see would be to consider Dependency Triggers under a single transaction, that don't either clear the directories or create a different working dir.

I understand that this is not in TC at the moment, but wondered if other people could see the benefit in this and that it could be considered for future releases?

Note: I hope I've managed to explain this situation correctly, if I haven't then let me know where I can make it clearer. Thanks!

Votes

Share

Seems, you might try to use artifact dependencies of A and B to Common to get the assemblies and put them in the place where the build expects them.

Since build A can go to different agent then was used to build Common, simple directories referencing does not seem a good enough solution.

The general problem here is that usually some checkins can go into both A and Common and A should be built with the version of Common that used the same sources' revision. This is currently not possible in TeamCity, but we are working on such source-dependencies right now (e.g. see my description of the feature in this thread).s