ReSharper Web Help

A simple way to share code templates is to export them into files and then share these files with other developers, who in their turn, will be able to import and use the templates. See Importing and Exporting Templates for more information.

Another way of sharing templates with your team members is using the mechanism of settings layers as code templates are saved in ReSharper settings. To make templates available to other developers who work on the same shared solution, you can either create new code templates in a team-shared settings layer or copy existing templates to a team-shared settings layer. For more information about settings layers, see Managing and Sharing Options.

To create a shared code template
  1. On the main menu, choose ReSharper | Templates Explorer or press Alt+R+P.
  2. In the Templates Explorer window that appears, click one of three tabs corresponding to the required type of code template: Live Templates, Surround Templates, or File Templates.
  3. In the Layer drop-down list, choose Solution [solution name] team-shared or another custom layer defined in the team-shared group.
  4. Follow the creating a template procedure.
To share an existing code template
  1. Click Manage Layers on the Templates Explorer toolbar or choose ReSharper | Manage Options on the main menu.
  2. In the Settings Layers dialog that appears, select a layer that contains templates to be shared.
  3. Do one of the following:
    • On the toolbar, click Copy Settings To, then click Solution [solution name] team-shared or another custom layer defined in the team-shared group.
    • Right-click the layer, then click Copy Settings To and choose Solution [solution name] team-shared or another custom layer defined in the team-shared group on the context menu.
  4. In the Copy To dialog that appears, select the LiveTemplates check box under PatternsAndTemplates.
  5. Click OK to complete the process.

See Also

Concepts

Procedures

Reference

External Links