I have 3 build scripts that create separate components of a distributed suite of applications. They are stored in a folder structure like the following:
LegacyComponents - VB6 code that is "live" but in the process of being replaced
NewComponents - Rewritten components in C#
Database
TeamBuildTypes
└ LegacyBuild
└ NewBuild
└ DatabaseBuild
In each build folder I have a script named TFSBuild.proj.
Because the builds are separate, they are each given a distinct build number. I need to label each one with a string that ties them all together so that I can "get" a label and have the entire consistent set of code.
I created a file called KitNumber.targets with a KitNumber property and put it in the TeamBuildTypes folder. I then put the following line in each build script:
<Import Project=".\..\KitNumber.targets"/>
I should now be able to change the kit number in one place and have it applied in every build.
This works on my dev box because the source has already been brought down from TFS but fails on the build machine because only the content of the directory containing the build script is brought down.
So where do I store the shared property so that I can use it in each script?