New MSBuild 4.0 Features

My current assignment has me working with the application build again.  MSBuild 4.0 got a number of new features which I’m only now getting to take advantage of.  The coolest one so far is the extensible task factory.  It lets you define custom MSBuild tasks right in the project file, instead of having to create a separate DLL for them.  Andrew Arnott wrote a custom factory that lets you define custom MSBuild tasks using PowerShell.  Because we’re using PowerShell for UI automation testing of our application, we’ll soon be able to integrate those tests into our build system.

Another feature I just learned about is conditional constructs.  They provide functionality equivalent to a case statement you might see in other languages. It’s much more flexible than the Condition attribute available on most MSBuild tasks.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.