Reputation: 7897
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.
Upvotes: 12
Views: 7991
Reputation: 981
My 2 cents - I was in a situation where I had to quickly create a build script for a project that was to be run on a vanilla Windows machine (without TFS and VS.NET installed). The build script was supposed to do the following -
I had to look beyond MSBuild 4.0, since I wanted an easy way to run the tools mentioned above and also send email. I looked at both MSBuild Community Tasks and also MSBuild Extension pack. While I have read that the extensions pack is a sophisticated wholesome package, I still had a try but I ended up using Community pack as it was really easy to use and even extend the code as compared to the other, EVEN with less or no documentation. Extensions Pack, in my opinion is an option only if you have time to understand how to work with it.
Upvotes: 1
Reputation: 163
I am currently using MSBuild Community Tasks in my work. I didn't have contact with other extensions, but I can tell few things on this library.
Pros:
Cons:
Summary:
This is an useful tool, easy to install and use, it can help to make your code a lot clearer, easier to understand, and it can save some time. I think the biggest problem is documentation, but you can just write name of task and library in google and find some code on forums, blogs and here.
Upvotes: 1
Reputation: 9938
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.
Upvotes: 8