This is going to take some work, since Team Build assumes that the set of files being monitored for changes and the set of files you want to download (the build workspace) are the same thing. I would write a custom msbuild task. Basic steps:
- Get the local version of the special file with GetExtendedItem()
- Compare it against the version recorded in the previous successful build (store this info in the registry, or maybe some hardcoded path)
- If the versions match, abort the build
- If not, continue the build
- If the build is successful, update the registry
Besides GetExtendedItem() [this is the API that tf prop calls, by the way], the other info that might be useful for a task like this is the most recent changeset contained in the workspace. To get this efficiently, use QueryHistory instead, passing a WorkspaceVersionSpec for both versionFrom and versionTo. Equivalently: tf hist $/ -r -version:W~W
Richard Berg
2009-08-27 16:11:19