Home > Code Generation, Options/Settings > Importing and Exporting CodeRush code templates

Importing and Exporting CodeRush code templates

October 2nd, 2012

In case you want to share your custom code templates with others, you can easily export them. As recommended, custom templates should be stored in a separate folder. You can export the entire folder. Simply right-click the folder you wish to export on the Templates option page and select the corresponding item:

CodeRush Export Template menu item

The standard file saving dialog will appear allowing you to select the target location and the file name. The file name will be automatically composed from the active language and the parent folder names. The extension of the exported file will be “.xml”, e.g.:


To import templates on a destination computer, open up the Templates option page, right-click any item in the list of templates and choose the “Import Templates…”:

CodeRush Import Templates menu item

Then, choose the previously exported templates file.

When you import the templates from a file, the following dialog may appear:

CodeRush Category Exists dialog

This means that the importing templates category with the same name already exists. You have two choices:

  • replace the existing templates if they exist in the imported category;
  • rename the imported category name.

Choose your option and click OK to import templates. Then, click OK or Apply on the Options Dialog to save the templates.

Products: CodeRush Pro
Versions: 12.1 and up
VS IDEs: 2008 and up
Updated: Oct/02/2012
ID: C196

Similar Posts: