Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
 How to: Create Project Templates

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Studio
How to: Create Project Templates

This procedure enables you to create a template using the Export Template wizard. For information on manually creating templates, see How to: Manually Create Project Templates.

To create a custom project template with the Export Template wizard

  1. Create a project.

    NoteNote:

    Use only valid identifier characters when naming a project that will be the source for a template. A template exported from a project named with invalid characters can cause compilation errors in future projects based on the template. For more information on valid identifier characters, see Declared Element Names.

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

  3. As appropriate, edit the code files to indicate where parameter replacement should take place. For more information on parameter replacement, see How to: Substitute Parameters in a Template.

  4. On the File menu, click Export Template. The Export Template wizard opens.

  5. Click Project Template.

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

  7. Select the type of template that you want to create.

  8. Click Next.

  9. Select an icon for your template. This icon will appear in the New Project dialog box.

  10. Enter a template name and description.

  11. Click Finish. Your project is exported into a .zip file and placed in the specified output location, and, if selected, imported into Visual Studio.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
You may not see 'Export Template' menu choice      Eddie Y   |   Edit   |   Show History
One of the steps above mentions clicking on the 'Export Template' option of the File menu, but you may not initially see it there. In that case:
  • Right-click the menu bar and choose 'Customize....'
  • Click on the File category and then 'Rearrange Commands'
  • Click the 'Add...' button, then click the 'File' category in the dialogue that pops up
  • Scroll down until you see 'Export Template...', then highlight that and click OK.
  • Use the Move Up/Down buttons to place it where you want
  • Click 'Close' a couple times
Now you have 'Export Template' available and can follow the steps above!

Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker