Passing custom properties to each individual solutions in Team Build

Though one of my earlier blogs is titled "Building .NET 1.1 application using Team Build", the principal used in that blog can easily be generalized to pass any custom property to each solution/project file while building using Team Build.

Say you want to sign each assembly built by a key. One option is to open each project and set the SignAssembly and AssemblyOriginatorKeyFile properties to appropriate value. This is quite a work if there are more than handful of projects. Moreover, this will not work if want the signing to be there only for Team Build and not when developer builds on her desktop. (Or, may be you want to use two different keys.)

There is another option to do this easily in Team Build - change the AdditionalPropertiesForBuildTarget mentioned in the above blog to the following - 

<AdditionalPropertiesForBuildTarget>

SignAssembly=true;AssemblyOriginatorKeyFile=Z:\sign\mykey.snk

</AdditionalPropertiesForBuildTarget>

This will do the trick!

Thanks,

Gautam