Second edition of the MSBuild and Team Foundation Build book released

Not many books that are reviewed like this on Amazon: Now the heavily augmented second edition has just come out, written by several people at Microsoft and reviewed by the product team. New extensive coverage of building C++ with MSBuild Complete rewrite of the Team Build sections to cover the new Windows Workflow Foundation build…


Incorrect solution build ordering when using MSBuild.exe

We’ve had a few reports of cases where Visual Studio, and previous versions of MSBuild, will build the projects in the solution in the correct order, but the 4.0 version of MSBuild.exe gets the order wrong. Here’s a full description of what’s going on, why it began in 4.0, and the fix we recommend to…


Debugging MSBuild script with Visual Studio (3)

In my last two posts (here and here) I showed how to enable the unsupported MSBuild debugger to debug a build started on the command line with MSBuild.exe. In this final post, I’ll mention some other variations. Note that this blog is rather narrow, so some of the screenshots may be hard to see –…


Debugging MSBuild script with Visual Studio (2)

In my previous post, I showed how to enable the hidden Visual Studio debugger for MSBuild script, and demonstrated it by stepping through the evaluation of a C# project. In this post, I’ll keep debugging into the actual build of that project. Note that this blog is rather narrow, so some of the screenshots may…


Debugging MSBuild script with Visual Studio

Back when we started 4.0 development, I polled readers of the MSBuild blog to find out what features were most important to them. Debugging was #1 which was very surprising to us. Thinking about it more, it makes sense. In our team we’ve become so proficient ourselves at reading the XML and making sense of…


MSBuild Property Functions (2)

Some more information about this 4.0 feature. (I’ve also updated the first post with this, so everything’s in one place for your reference.) Built-in MSBuild functions The full list of built-in [MSBuild] functions, like the one above, are in the MSDN topic here. They include arithmetic (useful, for example, for modifying version numbers), functions to convert…


MSBuild Property Functions

Have you ever wanted to do something simple in a build, like get a substring of a property value, and found that MSBuild didn’t have syntax for it? You then had to write a task for it, which was tiresome to do for such a simple operation. What’s more, if you wanted to do this…


Tuning C++ build parallelism in VS2010

A great way to get fast builds on a multiprocessor computer is to take advantage of as much parallelism in your build as possible. If you have C++ projects, there’s two different kinds of parallelism you can configure. What are the dials I can set? Project-level parallel build, which is controlled by MSBuild, is set…


If your build fails with “MSB6002: The command-line for the “ResGen” task is too long”

If you have the RC build of VS2010, you are targeting the 3.5, 3.0, or 2.0 Framework, you have a VB or C# project which has a lot of references, and you also have a lot of .resx files, your build may break with an error message like this D:\Windows\Microsoft.NET\Framework\v4.0.30128\Microsoft.Common.targets(1835,9): warning MSB6002: The command-line for…


Article in .NET Developer’s Journal

There’s a new article by Xin Yan and myself published in the .NET Developer’s Journal. We cover MSBuild from scratch, but also the new file format features in .NET 3.5 and our plans for the future. Check it out. Dan