Instant Feature Builder extension by Michael Lehman lets you package documentation, source code and interaction logic to run inside Visual Studio. To see how an end product may look like, you can install one of the several guides that use the Feature Builder engine: MVVM Training, Hands On Lab: Introduction to Windows Workflow Foundation (WF4), WPF Simple Application Walkthrough.
Let’s look at the WF4 Hands On Lab package. First of all, it’s a standard vsix package that is installed as a standard Visual Studio 2010 extension. After the installation you need to create a new project from a Hands On Lab exercise template:
When the new project is created, you get the packaged documentation, source code and interaction logic:
The Guidance Workflow Explorer window displays and tracks your progress on lab exercises, the Guidance Browser window contains instructions and helpful hyperlinks that open documents, web sites, files in the solution, Visual Studio tool windows and can execute Visual Studio commands like build and run a project, Solution Explorer displays source code prepared for the exercise.
Note that the guides mentioned above were produced using the more complex Feature Builder Power Tool. Instant Feature Builder uses the same Feature Extension Runtime, but don’t support adding custom menu commands to Visual Studio and don’t control workflow between parts of documentation. Advantages of Instant Feature Builder are prebuild hyperlinks to open a file or run a Visual Studio command and easy documentation publishing just dragging documents to a folder in Solution Explorer. I think Instant Feature Builder is significantly easier to use and covers all essential functionality for typical guide publishing.
To try Instant Feature Builder I created a tiny guide for my Tabs Studio add-in. Note that after installing Instant Feature Builder you also need to install Visual Studio 2010 SP1 SDK. Create a new project from the InstantFeatureExtension template, the project name will be the name of your extension:
To add a sample project to your guide, open a new Visual Studio instance, create a new C#, Windows, WPF Application project and then export it as a template using the File – Export Template… command. The Template Name parameter is very important as by this name your users will need to locate the template in the New Project dialog to instantiate the guide. Uncheck the Automatically import the template into Visual Studio option:
Once created, drag TabsStudioGuide.zip to the Templates – Projects folder in Solution Explorer of your guide solution:
For documentation you can use the mht file format and edit it with Microsoft Word 2010. You can use images and reach text formatting as usual:
Instant Feature Builder conveniently creates the sample Overview.mht file in the Content – ProcessGuidance folder. This file contains sample hyperlinks to open a file and run a Visual Studio command. For your guide you can copy these hyperlinks and modify text and target in Word to open your files and run your commands. Once documentation files are ready, drag them to the Content – ProcessGuidance folder:
That’s all. Build your solution and publish the resulting TabsStudioGuide\bin\Debug\TabsStudioGuide.vsix on Visual Studio Gallery or on your own site. When another developer installs your extension, he will create a new project from your template and the guide with documentation, source code and helper links will be ready for him to learn:
Instant Feature Builder is a free open source extension for Visual Studio 2010. You can download the installer and source code from CodePlex.