Web Client Solution Template

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\Solution folder of the WebClientFactoryPackage project. After you register (or install) the guidance package, the templates are available under the Web Client Development node in the New Project dialog box of Visual Studio. The template names all begin with "Web Client Solution," as shown in Figure 1.
WebClientSolutionTemplatesInVisualStudio.png
Figure 1
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.
CreateWebClientSolutionRecipeWizard.png
Figure 2
Create Web Client Solution recipe wizard.

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=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
  <FullClassName>Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate</FullClassName>
</WizardExtension>
<WizardData>
  <Template xmlns="http://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).

Create Web Client Solution Next Steps

CreateWebClientSolutionNextSteps.png

Last edited Nov 12, 2007 at 3:26 PM by siacomuzzi, version 2

Comments

No comments yet.