Once the above changes are done on Web.Config file, you can
export the template. Follow these steps to make changes to the vsTemplate file
to use this wizard.
·
Locate the zip file that was created when you exported the file. You
can find the location of the zip file by going to
Tools->options->Projects and Solutions.
Figure 9
·
Extract the contents of the zip file.
·
Edit the MyTemplate.vsTemplate file.
·
Add the following after the TemplateContent section.
Listing 10
<WizardExtension>
<Assembly>ArticleWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=78777d1dc618b0a3</Assembly>
<FullClassName>ArticleWizard.Class1</FullClassName>
</WizardExtension>
·
ArticleWizard in Assembly element is the assembly name while
version is the current version of the assembly. The PublicKeyToken can be
found out by just going to the GAC and the publickeytoken is specified next to
the assembly.
·
Zip the template again.
With the above
steps you have created the Template which uses a Wizard. Now you can open VS
2005 and click on New->Web Site. Select the newly created Wizard; you
should be able to enter your server, database, userID and password information.
After clicking ok, it will create the database on the server specified and
also create the connection string in the Web.Config file.