Web Client Solution Template

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The guidance package includes four Visual Studio solution templates. This is to support two types of Web project modules (Web Application project and Web site project) in both C# and Visual Basic .NET. You can find the template files in the Templates\Solutions folder of the WebClientFactoryPackage project. After you install the guidance package, the templates are available under the Web Client Software Factory 2010 node in the New Project dialog box of Visual Studio. The template names all begin with "Web Client Solution," as shown in Figure 1.

Ff709851.68534006-ec12-4616-95e8-3f89594e84e4(en-us,PandP.10).png

Figure 9

Web Client Solution templates in Visual Studio

When you use one of the templates to create a new solution, the recipe framework displays a wizard that you can use to customize the generated code. Figure 2 illustrates the wizard as it appears when you use the Web Client Solution (C#, Web site) template.

Ff709851.8a430861-daf9-4759-aea9-1184b51eef3e(en-us,PandP.10).png

Figure 10

Create Web Client Solution recipe wizard

For detailed instructions about how to unfold the Web Client Solution template, see How to: Create a Web Client Solution.

Implementation Details

The Visual Studio template files contain additional XML that provides the connection between the solution template and the recipe framework. For example, the WizardData element in the template file for the Web Client Solution (C#, Web site) template specifies CreateWebClientFactorySolutionCS as the recipe that the framework executes when it unfolds the solution template.

<WizardExtension>
    <Assembly>Microsoft.Practices.RecipeFramework.VisualStudio, Version=2.0.0.0, Culture=neutral, PublicKeyToken= 31bf3856ad364e35</Assembly>
  <FullClassName>Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate</FullClassName>
</WizardExtension>
<WizardData>
  <Template xmlns="https://schemas.microsoft.com/pag/gax-template"
              SchemaVersion="1.0"
              Recipe="CreateWebClientFactorySolutionCS">
    <References>
    </References>
  </Template>
</WizardData>

You can find the CreateWebClientFactorySolutionCS recipe definition in the CreateWebClientFactorySolution.xml file (this file is located in the Recipes\CS folder of the WebClientFactoryPackage project).