This project has moved and is read-only. For the latest updates, please go here.

Updating Help Files with Latest TFS Build No

Jul 22, 2010 at 2:31 PM
Hi All,

I have successfully managed to get sandcastle documentation to be build and deployed as part of a team build (TFS 2010) and was wondering if it was possible to output the latest build number within the documentation each time?

As the shfbproj is a MSBuild file I wanted to leverage the $(BuildId) property to automatically add it somewhere in the compiled documentation. I have used the $(OutDir) build property within the help file builder "OutputPath" property to ensure the path is dynamic when built on the server and was wondering if I could do something similar by placing the $(BuildId) somewhere (I have tried adding it to the "Help Title" property but this did not work).

Any suggestions would be most appreciated.



Jul 22, 2010 at 4:20 PM

You should be able to reference it using replacement tag syntax within the HelpTitle property value in the project (for example: "Build {@BuildId}").  You may need to pass it into the project by passing it in with the other variables (add BuildId=$(BuildId) to the variables defined when the project is built).  If that doesn't work by itself, add a BuildId variable to the project's UserDefinedProperties property to serve as a placeholder for the passed in value.