Modifying the Guidance Package
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
You can modify the existing guidance package, or create new guidance packages, to customize the Smart Client Software Factory. You use Visual Studio and the Guidance Automation Toolkit to modify and create guidance packages. To download the Guidance Automation Toolkit, see Guidance Automation Extensions 2010 and Guidance Automation Toolkit 2010.
The Guidance Automation Toolkit documentation describes the considerations, design guidelines, and technical details that a developer uses to create a guidance package. This topic describes a few key use cases that you can use to modify the Smart Client Development guidance package. For further considerations and technical details, see the Guidance Automation.
This section includes development tips for modifying a guidance package.
Change the Guidance Package Identifiers for Your Custom Version
The Name and Guid attributes in the guidance package configuration file SmartClientDevelopment.xml uniquely identify the guidance package. If you do not change these identifiers, your custom version will replace the original guidance package when you install your custom guidance package. It is recommended that you also change the Caption and Description attributes.
<GuidancePackage xmlns="http://schemas.microsoft.com/pag/gax-core" xmlns:xi="http://www.w3.org/2001/XInclude" Name="CustomSmartClientFactoryPackage" Caption="Custom Smart Client Development" Description="Custom Smart Client Development" Guid="4D23D563-803C-43dc-BA99-38223B7C9888" BindingRecipe="BindingRecipe" SchemaVersion="1.0">
Use the Export Template Feature of Visual Studio to Create or Update Your Templates
When you create a template, create your project or item in Visual Studio and then export the project (or item) as a template. To update an existing template, you should also consider modifying the original source project in Visual Studio and then exporting it again. When you do this, you can use Visual Studio to verify your syntax.
|The Build Action property for the template code in the Smart Client Development guidance package solution is Content. This means that the template code is not compiled, and when you build your guidance package, Visual Studio will not report syntax errors in your template code. |
If you add new template files to your guidance package, for each new file, you must set the Build Action property to Content and set the Copy to Output Directory property to Copy if newer.
Update Your Templates to Associate the Recipe Framework
The Visual Studio templates you create for use with the recipe framework contain additional information when compared with the templates normally used by Visual Studio. You must add the following XML to your project's .vstemplate file to transform the template into a Guidance Automation Toolkit solution template.
Version=184.108.40.206, Culture=neutral, PublicKeyToken=31bf3856ad364e35
</Assembly> <FullClassName>Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate</FullClassName> </WizardExtension>
Bind Your Guidance Package After You Modify the Binding Recipe
The Smart Client Development guidance package contains the binding recipe named BindingRecipe. If you change the binding recipe, you must re-execute the binding recipe in your solution. To do this for existing solutions, disable, and then re-enable, the guidance package. When you do this, the Guidance Automation Extensions will execute the binding recipe.
Distributing a Guidance Package
Build the guidance package and distribute the VSIX file generated in the \bin\Debug or \bin\Release folder (whichever configuration was chosen during build). Users just need to double click the VSIX file to install the Guidance Package.