How to create a Visual Studio 2008 Web Form Template

Issue

Sometimes it can be useful to create a new development project from a pre-created web form project. Instead of copying and pasting a previous web form and modifying it to the new specifications, you can have a Web Form Project Template in Visual Studio containing a base of files that will always be needed in all (or some) new web form projects (e.g. WorkflowGen.My.dll, logos, stylesheets, etc). This can help with standardization of your corporate templates.

Solution

To create a custom web form project template you can use the Export Template Wizard in Visual Studio.

  1. Create a project.

  2. Edit the project until it is ready to be exported as a template.

  3. Choose File > Export Template.

  4. In the Export Template Wizard, click Project Template.

  5. If you have more than one project in your current solution, select the project you want to export to a template.

  6. Select the type of template that you want to create, then click Next.

  7. Select an icon for your template; it will appear in the New Project dialog box.

  8. Enter a template name and description, then click Finish. Your project will be exported tp a .zip file and placed in the specified output location, and, if selected, imported into Visual Studio.

The next time you create a new website or project, you’ll see the new template you created.