Gotcha: MSBuild nested loops (double batching)

I admit I didn’t get it on my first, quick, reading of “Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build” that MSBuild batching is somewhat counter-intuitive. I needed to have a nested loop in my script, like this pseudo code: foreach (solution in solutionItemGroup) { foreach (configuration in solution.Configurations) { build solution’s…

2

Pre/post-build event

This is a tip for all developers, not for BuildMasters only. The issue is those pre and post-build events that developers use to add any conceivable code… especially code that assume a developer’s workstation folder structure. Such code may break in a TeamBuild for many reasons: different folder structure — all binaries are produced in…


Drop: latest and previous

One small issue with the default layout of the Drop folder in TeamBuild is the lack of a fixed position for the outputs: binaries are written in $(DropLocation)\$(BuildNumber) and the latter is different at each build. Many times is convenient having a fixed location for the outputs: you may publish that folder as a network…


Some TeamBuild errors

Today I have three interesting build errors that may happen and I want to spare you the time it took me to understand their causes. TF215085 / TF214007 This error may appear in your first build run: it says «An error occurred while connecting to agent name», followed by a «No build was found with…


Resolve a $ path in TeamBuild

There are some really useful TeamBuild tasks whose purpose or usage is not immediate. Such is WorkspaceItemConverterTask: it allows to transform a $ path — that is the path to a file or folder in TFS Version Control — to the physical path that the file assume during the TeamBuild. To see how it’s used,…

4

Builds: how many?

Update (2011-03-21) Changed table layout. An interesting question I rarely see discussed is: how many build should I plan for in my project and how do they relate each other. This latter point is of paramount importance as it drives us to two other questions: why should I need such build? or, in other words,…

2