This topic has not yet been rated - Rate this topic

WizardExtension Element (Visual Studio Templates)

Contains the registration elements for customizing the template wizard.


  
    
<WizardExtension>
    <Assembly>... </Assembly>
    <FullClassName>... </FullClassName>
</WizardExtension>

The following sections describe attribute, child elements, and parent elements.

Attributes

None.

Child Elements

Element

Description

Assembly

Required element.

Specifies the name or strong name of an assembly that appears in the global assembly cache. There must be at least one Assembly element in a WizardExtension element.

FullClassName

Required element.

The fully qualified name of the class that implements the IWizard interface. There must be at least one FullClassName element in a WizardExtension element.

Parent Elements

Element

Description

VSTemplate

Contains all the metadata for the project template, item template, or starter kit.

WizardExtension is an optional child element of VSTemplate.

The following example illustrates the metadata for the standard project template for a Visual C# Windows application.

<VSTemplate Version="2.0.0" Type="Item"
    xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
    <TemplateData>
        <Name>MyTemplate</Name>
        <Description>Template using IWizard extension</Description>
        <Icon>TemplateIcon.ico</Icon>
        <ProjectType>CSharp</ProjectType>
    </TemplateData>
    <TemplateContent>
        <Project File="MyTemplate.csproj">
            <ProjectItem>Form1.cs<ProjectItem>
            <ProjectItem>Form1.Designer.cs</ProjectItem>
            <ProjectItem>Program.cs</ProjectItem>
            <ProjectItem>Properties\AssemblyInfo.cs</ProjectItem>
            <ProjectItem>Properties\Resources.resx</ProjectItem>
            <ProjectItem>Properties\Resources.Designer.cs</ProjectItem>
            <ProjectItem>Properties\Settings.settings</ProjectItem>
            <ProjectItem>Properties\Settings.Designer.cs</ProjectItem>
        </Project>
    </TemplateContent>
    <WizardExtension>
        <Assembly>MyWizard, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, Custom=null</Assembly>
        <FullClassName>MyWizard.CustomWizard</FullClassName>
    </WizardExtension>
</VSTemplate>
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
A Note About ', Custom=null'
As a heads up to other users, the ' , Custom=null ' has in some cases stopped the wizard from working. See the forum thread below: $0$0 $0 $0http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/0762d94c-0045-4c37-83d5-b57aa3dcf098/$0
Installing a wizard assembly to the GAC is not strictly necessary
All that is required is that Visual Studio be able to find it. Installing the assembly to %VSINSTALLDIR%Common7\IDE\PrivateAssemblies (for example) works too.

A facility for specifying the assembly location would have been nice, BTW.
Advertisement