0 out of 3 rated this helpful Rate this topic

Export Template Wizard 

Use the Export Template wizard to create new templates from project and items that are currently open in Visual Studio. You can access this wizard from the File menu by clicking Export Template.

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.

In This Section

This section explains the different pages of the Export Template wizard.

Choose Template Type, Export Template Wizard

Explains the options available on the Choose Template Type page.

Select Item to Export, Export Template Wizard

Explains the options available on the Select Item to Export page. This wizard page is only available for item templates.

Select Item References, Export Template Wizard

Explains the options available on the Select Item References page. This wizard page is only available for item templates.

Select Template Options, Export Template Wizard

Explains the options available on the Select Template Options page.

Related Topics

The following topics describe how to use the Export Template wizard to accomplish common tasks:

See Also

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Incompatible with C++

This feature is not available for C++ projects.

From within Visual Studio, the "Export Template..." menu item will often be disabled if you have only C++ projects in your solution. Even when it is enabled, you will not be able to choose a C++ project from the "Projects" dropdown list. In fact, though I can find no official confirmation of this, the new Visual Studio 2005 template system cannot be used for C++ code. Instead, refer to the Visual Studio 2003 template system.

Current (July 28, 2007) link to the Visual Studio 2003 template information: http://msdn2.microsoft.com/en-us/library/7k3w6w59(VS.80).aspx

The Export Template Wizard and replacement variables

When exporting a template with the Export Template Wizard, the wizard will examine the project and try to find possible replacements, and automatically substitute that code with a replacement variable. Not all values are replaced, such as time, since there are a large number of possible values that need to be scanned for.

Some replacements may be made too agressively. For example, at Microsoft the value of $registeredorganization$ is usually Microsoft. When we export a template, we need to open the template zip file and visually scan for the correct usage of the value $registeredorganization$. This is because some identifiers, such as Microsoft.Win32.RegistryHive.ClassesRoot will become $registeredorganization$.Win32.RegistryHive.ClassesRoot.

If you are using your organization name within your templates, then you will need to inspect any exported templates to ensure that any replacements are correct.

Advertisement