Friday, June 12, 2009

Overriding the default assembly output directory in Team Build

By default, Team Build (MSBuild-driven) wants to output compiled assets (assemblies, config, exe's, etc.) to a flattened ..\Binaries\Release|Debug directory. I had a client desiring to package up these assets in their relative, normal output directories into an MSI using WiX.

Fortunately, there's a simple directive to set within the TFSBuild.proj file such that the individual project OutDir is honored:

Set this within the main PropertyGroup element for your build. Unless you're performing a custom check-out, you'll also need to turn off read-only attributes set during the Get from version control. Update this attribute in the AfterGet target using an Exec task:

No comments: