views:

57

answers:

1

I have got a problem with reusing the same MSBuild targets for different build types on TFS. Let me describe the situation.

I have got two build types (CI - for continuous integration and RC - for release candidate). So I have got two build types defined in the TFS. Their *.proj files are under: - $/Repository/TeamBuildTypes/CI - $/Repository/TeamBuildTypes/RC

Also, I have got some common targets, like: ChnageVersion.taget, Deploy.tagert, etc. and I import them in the main *.proj file. Unfortunaltely, I have to keep two copies of them, one in each build type. I've been struggling to have only one copy of the common targets somewhere, but I give up. I can't do it, because when the build starts on a build agent, the build files are downloaded from: $/Repository/TeamBuildTypes/CI only. How can I make the build agent / TFS / whatever to download also $/Repository/TeamBuildTypes/Common for example?

A: 

We solved this by "installing" our common build components under $(MSBuildExtensionsPath) on our build servers which makes them easy to reference both from tfsbuild.proj as well as from *.*proj files in the sources path.

fredrikt
Thanks for your reply.I cannot do it because I have no access to the build machine :/ but I guess your hint would solve my problem.
Zbigniew Kawalec