Share via


Introduction to Feature Builder (part 1)

Over the course of a project (or several projects) it is common for teams to establish certain implementation patterns, favour certain code templates, use a common set of tools and so on that allow them to be more productive. They may then take this to the next level and ‘productize’ these patterns, templates and tools and provide them to other teams/companies (sometimes as a commercial offering).

The problem, most of the time, is that for someone attempting to understand and use the tool, the experience is somewhat ‘disconnected’. The user may have to switch between online/offline documentation and the actual tool (e.g - a Visual Studio Add-In or package), and this context switching can be rather annoying sometimes. Being able to provide the guidance for the tool and the tool itself all in one package that is integrated into Visual Studio is an approach that can make the end-user experience more productive.

Although the Visual Studio Extensibility story has come a long way in the recent past, writing ‘packages’ that automate and extend Visual Studio is not a trivial task. So what we need is some tooling that will simplify the experience of building tools inside Visual Studio as well as allowing us to put the associated guidance also inside Visual Studio. This is where Feature Builder comes in.

“Feature Builder is an official Power Tool from the Architecture Tools team within the Visual Studio Product Group enabling the rapid construction of Visual Studio Extensions (VSIXs) that combine VS Extensibility (menus, etc.), Project/Item/T4 templates and step-by-step guidance/ documentation. The output VSIX, called a Feature Extension, delivers all these things, including the guidance, directly within Visual Studio”

Some of you may be familiar with Microsoft's (specifically the Patterns & Practices team's) initial forays into providing executable guidance and guidance automation inside Visual Studio with the Guidance Automation Extensions (GAX) and Guidance Automation Toolkit (GAT) and the ‘Software Factories’ (such as the Service Factory) initiative. Feature Builder, in some ways, can be viewed as the ‘next generation’ of guidance authoring and extensibility tooling.

So, what can you do with Feature Builder? As the italicized paragraph indicates, Feature Builder allows you to create packages inside Visual Studio that may be accompanied by project and solution templates (and the associated wizards that are often used with VS templates). The libraries and extension mechanisms offered by Feature Builder make it easy to do things like adding custom menu items to VS or to the solution context menu, and so on.

Feature Builder also allows you to ‘control’ the sequence of actions that the user can take. So instead of a passive document that opens up inside Visual Studio, to which the user may not pay much attention (and wander off randomly clicking menu items and buttons), the authoring workflow will enable and disable VS features and commands according to certain conditions so that the user can only make use of them at the appropriate time. How much control you choose to exercise will depend on your package and the intended audience. Suffice to say that Feature Builder makes it easier to always do the right thing when using a particular tool/package.

So how do you acquire Feature Builder and where do you go to learn more about Feature Builder?

Feature Builder is delivered as an extension to Visual Studio 2010 Ultimate and requires installation of the Visual Studio SDK to author/build Feature Extensions. The 1.0 version supports feature extensions running on Visual Studio Professional edition and higher (but still requires the Visual Studio Ultimate edition to author a feature extension).

The following videos on Channel 9 are a great resource in which Michael Lehman, one of the lead architects on the Feature Builder project, walks us through the main features of Feature Builder and explains how we can use them to create a Feature Extension.

Feature Builder is now starting to make an appearance in various guidance materials. For example, Ron Jacobs has authored the following material with Feature Builder

Ron Jacobs also has a very informative video on Channel 9 where he explains how he used Feature Builder to author the Workflow Services hands-on lab and the issues he found with the authoring experience and tooling along the way.

So, that’s it for the introduction to Feature Builder. I hope this post has helped you understand some of the background and aims of Feature Builder. In the next post we will look into the various Feature Extension Scenarios for which Feature Builder provides out-of-the-box templates and in subsequent posts we will start building feature extensions for some of those scenarios.

Written by Santosh Benjamin