I am trying to set up a common.targets file with some common msbuild targets I want to use in my team builds and therefore import into my TFSBuild.proj files. I am wondering what is the best way to achieve this? Do I need to store common.targets right next to each TFSBuild.proj file and therefore having duplicates of the targets file for each team build or is there another way? I would rather not put the targets file on each of the build machines.
Team Build has a bootstrapper phase before the TFSBuild.proj is invoked in which only the TFSBuild.proj and other files in the same directory is downloaded from source control. So if you want your targets file to be under source control, you need to put it at the same location as the TFSBuild.proj
I have never tried it, but you might be able to put the targets file on a network share, and import it using a unc share. Something like
<Import Project="\\anothermachine\share\something.targets"/>
But that would require that the build account and all people running desktop builds have access to that network share.