Configuring a TFS 2010 build agent to compile SharePoint 2010 projects

I’ve been doing several TFS consulting gigs over the last couple of years. The one thing that keeps popping up is the requirement to build several types of platforms using TeamBuild/TFSBuild. My preference is to isolate build agents and their customisations. This means for example that I have a mix of build agents like the following: Standard (full VS install + any common additions - WiX for example) SharePoint BizTalk Tagging the build agents and configuring the build definitions fo... [More]

Full support for custom types in TFS Build 2010 build definition editor

I have been putting together a customised build process with TFS Build 2010. Several parts of the functionality added to the build process involve custom types that are used as arguments for the build definition. Deploy and configuration update information are some examples of this. I wanted to get the same designer experience out of the Process tab property grid that is available for properties like the test list definition. The Automated Tests property seen here has a set of sub-items for ... [More]

TFS Build workflow variable reset when provided to Run On Agent

I’ve been working with TFS Build in [VS] 2010 over the last week. It has been a lot of fun working with the new workflow support for build automation. I did hit an interesting issue the other day though. My build workflow attempts to determine a “build version” for the build. The build version is used to update the build number and is then injected back into the version info files for the compilation of the solution. It is determined by finding all the version files in the solution. We tend to ... [More]

Generating Sandcastle documentation with TeamBuild

Automatically generating technical documentation from code comments is really easy with Sandcastle and SHFB. If you are using TeamBuild to provide continuous integration then this is a great place to ensure up to date documentation is being produced. There a two ways that Sandcastle can be used to generate documentation. The first is dynamically without a SHFB project file and the second is with a SHFB project file. Dynamically creating documentation is an easy solution that essentially documen... [More]

Removing TeamBuild report noise

A patch came out in January which fixes the noise issue in TeamBuild reports. Build reports now only display one build step per project build by the solution after this patch is applied.

Injecting a version number into WiX via TeamBuild

This has been an interesting nut to crack. There are several published ways to inject a version number into WiX as part of a TeamBuild process. This is the way that I have found has the best results. The following target overrides the ResolveSolutionPathsForEndToEndIteration MSBuild target to inject a $(VersionNumber) value if a custom version number has been defined or calculated in the build script. The default implementation of ResolveSolutionPathsForEndToEndIteration is called if no version... [More]

Psexec hangs in TeamBuild script when invoking msiexec on remote machine

I've come across this one a few times and I can never remember what the answer is off the top of my head. We are getting the msbuild script to execute psexec to invoke msiexec on a host machine to install an msi compiled by the build script. This is done so that the build script can then execute integration and load tests on the deployed application. In modifying the build script, it seems like I have accidentally changed the psexec arguments which has caused psexec to hang on the build agen... [More]

TeamBuild: Custom build steps

I've been working with team build a fair bit over the last month. Yesterday I was bouncing through the MSDN documentation during my MSBuild travels and I came across a very handy build task. The BuildStep task allows you to create custom entries in the build report. Take the following build target for example: <Target Name="RunIntegrationTests"> <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" Name="Running integratio... [More]

Troubleshooting DataDude deployment with TeamBuild

I'm working through the best way of getting DataDude to build and deploy a database using TeamBuild. When I kicked off a build, the build script failed with the following error: Task "SqlBuildTask"   Building deployment script for [DatabaseName] : AlwaysCreateNewDatabase, EnableFullTextSearch, BlockIncrementalDeploymentIfDataLoss MSBUILD : Build error TSD158: Cannot open user default database. Login failed. MSBUILD : Build error TSD158: Login failed for use... [More]

SandCastle Builder Support for Namespace Documentation

At work we have recently integrated building SandCastle documentation into our TeamBuild process using the SandCastle Help File Builder (SHFB) application. I created a wrapper application to achieve the same thing as a local dev process to help authoring the help contents. One of the issues we had was how to add namespace documentation. The process we were using was to pass all the required information to SHFB instead of using a project file. The SandCastle project file is where the namespace do... [More]