.net – MSBuild Extension Pack vs MSBuild Community Tasks

build-automationmsbuildmsbuildcommunitytasksmsbuildextensionpacknet

I am just starting to make custom MSBuild scripts for the first time. I see that there are two standard options for extending the features: MSBuild Extension Pack and MSBuild Community Tasks.

I am looking for some guidance about what the differences are between these, and why I would use one over the other, or even both. I have Googled on Bing, but can't see the wood for the trees. Any guidance appreciated.

Best Answer

I'll chime in, just 2 cents worth. Couple of things -- first of all I wouldn't exactly call them "standard" options. Both predate MSBuild 4.0 and the inline task and property function features and many of the tasks in them are pretty much obsolete. I've written thousands of lines of MSBuild and have only ever needed tasks from either of those libraries a couple times.

What is nice about them is that they are pretty modular. You can pick and choose only the assemblies and targets files you have need of and check them into your code base without getting "stuck" with the entire implementation. At times I've cherry-picked a task from one library and a task from the other, both in the same build. I always prefer using simple MSBuild 4.0 features over something in the library. I've had interest in some of the tasks in the library but the behavior wasn't at all what I needed so I whipped up my own (the zip tasks comes to mind for this one, since I wanted to control zipping in groups that didn't correlate to the source folders). Once you have to write a single custom task it becomes really easy to roll another and another, all in the same assembly.

In the end, I would say that it isn't really about the library so much as it is about the very specific need you have for particular tasks in the library, use what you need and don't tangle up your build with anything but that.

Related Topic