We want to store our overridden build targets in an external file and include that targets file in the TFSBuild.proj. We have a core set steps that happens and would like to get those additional steps by simply adding the import line to the TFSBuild.proj created by the wizard.
<Import Project="$(SolutionRoot)/libs/my.team.build/my.team.build.targets"/>
We cannot have an import on any file in the $(SolutionRoot)
because at the time the Import statement is validated, the source has not be fetched from the repository. It looks like TFS is pulling down the TFSBuild.proj
first without any other files.
Even if we add a conditional import, the version in source control will not be imported if present. The previous version, already present on disk will be imported.
We can give up storing those build targets with our source, but it is the first dependency to move out of our source tree so we are reluctant to do it.
Is there a way to either:
- Tell Team Build to pull down a few more files so those
Import
statements evaluate correctly? - Override those Team Build targets like
AfterCompile
in a manner besides theImport
? - Ultimately run build targets in Team Build that are kept under the source it's trying to build?