Monday, September 13, 2010

TFS and MSBuild properties

My current client uses TFS as build server and MSBuild for deployment scripts. Whenever I have to change the scripts I spend time searching for the various properties which they expose. So this is my reminder, to kick start the process next time.


There are many different ways of using MSBuild but the list of Reserved Properties is always a good start. An example property is “$MSBuildProjectFile”, which returns the directory where the project file is located. From here I can often navigate using relative paths to the various places I need to go.

Any talk of MSBuild would not be complete without mentioning these extension libraries; SDC Tasks and MSBuildTasks. They provide a hosts of extras from re-writing XML files to creating web sites.


The build process (Team Build) is built upon MSBuild and, like all processes which are managed with MSBuild, it provides a set of extensions for querying the environment and managing the process. The first port of call is the MSDN page. After reading through this which is lengthy, I would recommend having a look at Martin Woodward’s post; useful Team Build properties.

No comments: