Guidance Automation Overview
Architects use the Guidance Automation Toolkit to create a guidance package. After it is created, the architect distributes a Microsoft Windows Installer that contains the guidance package. Developers install the guidance package on development computers that
have the required run-time component Guidance Automation Extensions. After a guidance package is installed and enabled for a particular solution, the developer executes recipes to perform the required tasks. These tasks affect the structure and source code
of the active solution. For example, a particular task may add a project to the solution and create three classes in that project. The developer adds customizations and additional business logic to the solution. During development, the developer can use the
guidance package to perform other tasks. The developer builds the application and distributes it to the end users. Figure 1 illustrates how a guidance package is created and used across the development life cycle.
Guidance life cycle
A guidance package extends Visual Studio and offers guidance to developers as they develop applications. Developers activate the guidance through gestures in Visual Studio. For example, a developer can right-click a class in Solution Explorer and then click
a guidance package menu item. When the developer clicks the menu item, the package executes a series of tasks. The results of the task can be simple, such as the addition of method to the class, or complex, such as the creation of new project with classes
that are added to the solution.
A guidance package often includes Visual Studio templates. When a developer installs a guidance package that includes a Visual Studio template, the template will appear in the
dialog box of Visual Studio. Each guidance package that includes a Visual Studio template appears under the project type category named
. Figure 2 illustrates a development computer that has two guidance packages, each of which contains at least one Visual Studio template: Web Client Development and Guidance Package Development. The Web Client Development guidance package
contains a single Visual Studio template named Web Client Solution.
Guidance packages with solution templates in the Visual Studio New Project dialog box
Guidance packages also include recipes. Recipes define a series of actions that a developer typically manually performs in Visual Studio. The actions are activities that create or transform solution artifacts. A developer can use a recipe to automate these
actions. Recipes appear in the Visual Studio interface as commands. Recipes can be run on particular solution elements or on a group of solution elements that share certain characteristics (for example, all C# projects). Figure 3 illustrates the Add View (with
presenter) recipe as it appears on the Add
menu of the Module1
Web site folder.
The View(with presenter) recipe menu item
Actions create or update solution artifacts; they do this by expanding a Visual Studio template or a T4 template. Figure 4 illustrates the relationship between a guidance package and the key components it contains.
Key components of a guidance package
Guidance Package Manager
Using the Guidance Package Manager, developers perform a variety of operations on guidance packages, recipes, and Visual Studio templates.
To view the Guidance Package Manager
Guidance Package Manager
- Using Visual Studio, open your solution.
- On the Tools menu, click Guidance Package Manager. Figure 5 illustrates the Guidance Package Manager in a solution that uses the Web Client Development Package.
The following user operations are supported from the Guidance Package Manager:
- Viewing installed guidance packages. Information about installed guidance packages is stored in the framework manifest file. The Guidance Package Manager inspects the file and shows the user the available guidance packages.
- Inspecting content of a guidance package. When asked to inspect a guidance package, the Guidance Package Manager reads the configuration file of the guidance package and inspects the guidance package directory. Based on this information, the Guidance
Package Manager shows the user a list of guidance package recipes and templates. The user can inspect both enabled and disabled guidance packages.
- Enabling a guidance package. After a guidance package is installed, it must be enabled before its recipes and templates can be used inside a Visual Studio solution. The developer can enable a package from the Guidance Package Manager.
- Disabling a guidance package. This is the opposite of enabling a guidance package. Disabling a guidance package does not uninstall it.
- Viewing solution recipes and templates. The Guidance Package Manager communicates with the recipe framework foundation and shows all recipe references and template references currently associated with the solution.
- Executing a recipe. The developer can select a recipe reference and execute its recipe directly from the Guidance Package Manager. Templates cannot be executed from the Guidance Package Manager; they have to be executed from the Add New Project dialog
box or the Add New Item dialog box.
- Deleting a recipe reference. The developer can delete a recipe reference. To do this, select the recipe reference, and then click Delete.
Installing and Enabling a Guidance Package
Before a guidance package can be used in a solution, it must be installed and enabled. You install a guidance package by executing a Windows Installer package.
Note: If you want to install a guidance package on the same computer that was used to create the guidance
package, you must first unregister the guidance package before you install it. To do this, use the Unregister
Guidance Package recipe (available in the Guidance Package Manager when you have the Guidance Automation Toolkit
After you install a guidance package, you must enable it before you can use its recipes and templates inside a Visual Studio solution. A guidance package can be enabled in one of two ways:
To enable a guidance package with the Guidance Package Manager
- Unfolding a Visual Studio solution template that contains actions that enable the package
- Selecting and enabling the guidance package in Guidance Package Manager
- Using Visual Studio, open your solution. You must enable a guidance package for each solution.
- On the Tools menu, click Guidance Package Manager.
- In the Guidance Package Manager dialog box, click Enable/Disable Packages.
- In the Enable and Disable Packages dialog box, select the check boxes for each package that you want to enable.
- Click OK.
Guidance Automation Toolkit
The Guidance Automation Toolkit is an extension to Visual Studio 2005. With it, architects can author rich, integrated user experiences for reusable assets including frameworks, components, and patterns. Architects and developers use the Guidance Automation
Toolkit to create guidance packages. By using the toolkit, architects can ensure that repetitive and often error-prone activities are performed in a consistent manner; this streamlines and accelerates the development process. It also ensures that the resulting
solutions are created in a way consistent with the architecture guidance.
Note: You must install the Guidance Automation Extensions to use the Web Client Development Package. If you
want to customize the package or create your own guidance package, you must also download and install the
Guidance Automation Toolkit.