This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
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 package. Developers install the 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 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 New Project dialog box of Visual Studio. Each guidance package that includes a Visual Studio template appears under the project type category named Guidance Packages. Figure 2 illustrates a development computer that has multiple guidance packages that contain at least one Visual Studio template. The Smart Client Development guidance package contains two Visual Studio templates: Smart Client Application (C#) and Smart Client Application (Visual Basic).
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 Smart Client Factory menu of the BusinessModule1 project.
The Add 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 Automation Toolkit
The Guidance Automation Toolkit is an extension to Visual Studio. 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.
|You must install the Guidance Automation Extensions to use the Smart 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.|
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
- 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 Smart Client Development Package.
Guidance Package Manager
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 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 by selecting it and clicking delete.
Using the Guidance Navigator
The Guidance Navigator is a dockable tool window that helps you discover, learn about, and use guidance in a guidance package as you work on a Visual Studio solution. The Guidance Navigator is automatically displayed when a guidance package is enabled. If you close this window, it can also be displayed in Visual Studio; to do this, click Other Windows on the View menu, and then click Guidance Navigator Window. Using the Guidance Navigator, you can perform the following tasks:
- Select a guidance package.
- View guidance package overview information.
- View available recipes and templates.
- View a history of recipes and templates that have been run.
- Learn more about a recipe or template.
- Execute a recipe or template.
- Learn what to do after you execute a recipe.