Guidance Automation | New in This Guidance Bundle | Recipes and templates documentation | How-to topics

Preparing Visual Studio for Automated Guidance

To use the automated guidance package included in this bundle, you must install a prerequisite run-time component named the Guidance Automation Extensions. If you want to modify the software factory guidance package, author your own guidance package, or manually register guidance packages, you must also install the Guidance Automation Toolkit. For more information, see Guidance Automation Toolkit and Guidance Automation Extensions Download.

Installing a Guidance Package

Before a guidance package can be used in a solution, it must be installed (or registered) and enabled. You install a guidance package by executing a Windows Installer. You can also manually register a guidance package from source code using the Guidance Automation Toolkit.
To distribute a guidance package, you create and distribute a Windows Installer package. Developers run the setup program and then enable the guidance package. If you distribute a new version of the guidance package, developers must uninstall the previous instance of the guidance package before installing the new one.
The following procedure describes how to install the Web Client Development Guidance Package.

To install the guidance package for Web Client Development using the Windows installer
  1. Close all instances of Visual Studio.
  2. Execute the file GP.msi. This file is located in the root folder of the bundle.
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 installed).

After the installation package that executes the guidance package is installed, it appears in the Add/Remove Programs dialog box.

Enabling a Guidance Package

To use the guidance package’s recipes and templates inside a Visual Studio solution, you must enable it. A guidance package can be enabled in one of two ways:
  • Unfolding a new Visual Studio solution template that contains actions that enable the package
  • Selecting and enabling the guidance package in Guidance Package Manager (you must have an existing Web client solution to do this)
The following procedure explains how to enable the guidance package by unfolding a solution template.

To enable the Web Client Development Guidance Package by unfolding a solution template
  1. In Visual Studio, point to New on the File menu, and then click Project.
  2. In the New Project dialog box, expand the Guidance Packages node, and then click the Web Client Development project type.
  3. In the Templates window, click one of the solution templates.
  4. (Optional) Change the name of the solution in the Name box and change the location of the solution in the Location box.
  5. Click OK.The following procedure describes how to enable the Web Client Development Guidance Package for an existing solution, using the Guidance Package Manager.
Note:
You can use the Web Client Development Guidance Package included in this bundle side-by-side with the Web Client Development Guidance Package included in the Web Client Software Factory – June 2007 release.

To enable the Web Client Development Guidance Package with the 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, as shown in Figure 1, select the check box for the Web Client Development October 2007 guidance package.
UseGuidancePackageManagerToEnable-DisableGuidancePackages.png
Figure 1
You use the Guidance Package Manager to enable and disable guidance packages.
  • Click OK.
Note:
The recipes in the Web Client Development Guidance Package are designed to work with a solution that you create with the Web Client Application template, excepting the Enable Ajax recipe which can also be executed on a regular ASP.NET application. For a description of the requirements for a recipe, see the documentation for that recipe.

Guidance Automation Toolkit

The Guidance Automation Toolkit is an extension to Visual Studio 2005. By using 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 Guidance Package. If you want to customize the package or create your own guidance package, you must also download and install the Guidance Automation Toolkit.

Registering a Guidance Package

The installation process works well when you distribute a guidance package. However, it makes it difficult to efficiently test incremental changes as you modify a guidance package. For developers of guidance packages, the Guidance Automation Toolkit provides the following recipes to make it easier to test changes:
  • Register Guidance Package. This recipe registers the package you are developing on your computer. Registration is a form of installation that you can perform without leaving the Visual Studio development environment.
  • Quick Register. This recipe performs a quick registration of the guidance package. You must perform a full registration of the guidance package before you use the Quick Register recipe.
  • Unregister Guidance Package. This recipe reverses the registration.
The following procedure explains how to register the Web Client Development Guidance Package from source code.

To register the Web Client Development Guidance Package and guidance package installer
  • Using Visual Studio, open the solution file WebClientFactory Guidance Package.sln.
  • On the Build menu, click Rebuild Solution. By default, this is a debug build.
  • Use the Guidance Package Manager to enable the Guidance Package Development Guidance Package. You must do this before you can use the Register Guidance Package recipe, Quick Register recipe, and Unregister Guidance Package recipe.
Note:
After you enable the Guidance Package Development Guidance Package, the Guidance Navigator will appear in Visual Studio. This window displays an overview of the guidance package and available recipes.
  • In Solution Explorer, right-click WebClientFactoryPackage, and then click Register Guidance Package. After you register a guidance package, you can open a new instance of Visual Studio to test the functionality of the package. This means that you do not have to continually rebuild the setup project and run the Windows Installer package for the guidance package every time you want to test the progress of your development.
You should unregister the package if you want to do one or both of the following:
  • Install the guidance packages using the Windows Installer package.
  • Remove the guidance package from your computer.
After you unregister a guidance package (or uninstall it), you can register it again by executing the Register Guidance Package recipe.

Uninstalling

If you want to uninstall the Guidance Automation Toolkit and Guidance Automation Extensions, you must first uninstall (or unregister) each guidance package, as described in the following procedure.
To uninstall the Guidance Automation Toolkit and Guidance Automation Extensions
  1. Open a solution that is using an automated guidance package.
  2. On the Tools menu, click Guidance Package Manager.
  3. In the Guidance Package Manager dialog box, click Enable/Disable Guidance Packages.
  4. In the Enable/Disable Guidance Packages dialog box, clear the check box next to the guidance package you want to unregister.
  5. Click OK, and then click Close.
  6. Repeat the process until you have removed all the guidance packages, including the Guidance Automation Toolkit package.
  7. Close Visual Studio, and then open the Add/Remove Programs dialog box from Control Panel.
  8. Select the Guidance Automation Toolkit entry, and then click Remove.
  9. Select the Guidance Automation Extensions entry, and then click Remove.
If you receive an error message when attempting to uninstall the Guidance Automation Extensions, you can manually clean up the stored settings for registered guidance packages using the following procedure. This may be required if you do not first unregister all the guidance packages registered on your computer. You can also use this technique to remove individual guidance packages if required.

To manually remove a guidance package
  • In a text editor, open the file ReceipeFramework.xml. It is located in the C:\Documents and Settings\All Users\Application Data\Microsoft\Recipe Framework\ folder. The contents of the <GuidancePackage> elements will help you to locate the entries you must remove from Windows Registry.
  • On the taskbar, click Start, and then click Run. In the Open box, type regedit, and then click OK.
  • Open the Registry key HKLM\Software\Microsoft\VisualStudio\8.0 and look for the following subkeys:
    • Packages\{77d93a80-73fc-40f8-87db-acd3482964b2}\Templates. Delete all subkeys that refer to guidance packages you want to remove (each has a GUID as its key name that matches the entry in the XML file).
    • Languages\CodeExpansions\CSharp\Paths. Delete all values that refer to guidance packages you want to remove.
    • Menus. Delete all values that refer to guidance packages you want to remove (they will probably be at the end of the list following those with GUID names).
    • NewProjectTemplates\TemplateDirs. Expand each of the subkeys (the name of each one is a GUID) and expand the /1 key below that. If you find one where the (Default) value is the name of a guidance packages you want to remove, delete the entire GUID key and the /1 key below that.
  • Go back to your XML file and remove all of the <GuidancePackage> elements that refer to guidance packages you want to remove, and then save the file.
  • If you installed any of the guidance packages you want to manually remove from a Windows Installer, run the Windows Installer CleanUp utility to clean up the Windows Installer–related registry settings. For information about the Windows Installer CleanUp utility, including download information, see Description of the Windows Installer CleanUp Utility.
  • If you have removed the settings for all registered guidance packages and want to remove the Guidance Automation Extensions from your computer, the Remove option in the Add/Remove Programs dialog box will now succeed.
Guidance Automation | New in This Guidance Bundle | Recipes and templates documentation | How-to topics

Last edited Nov 20, 2007 at 1:12 PM by ejadib, version 3

Comments

No comments yet.