Settings Layers dialog box is the central control panel for
managing ReSharper options.
It displays all settings layers available for the current solution and provides controls for
managing these settings.
There are three major settings layers:
- This computer - The settings from this layer are applied everywhere unless overridden by settings from solution-specific layers. This layer is saved in the ReSharper configuration folder and is always shown in this dialog box.
- Solution team-shared - You will need this layer only if you are going to put your solution under a version control system (VCS) and share it with your team. This layer is saved in the %SolutionName%.sln.DotSettings file, in the solution folder; it is shown in this dialog box only when a solution is opened. If your team members use ReSharper, you can share ReSharper settings with them by putting this file under a VCS. This layer may be helpful for sharing code style settings, templates, etc. Settings defined in this layer will override settings from This computer layer.
Solution personal -
You can save your personal solution-specific settings in this layer.
This layer is saved in the
in the solution folder; it is shown in this dialog box only when a solution is opened.
Settings defined in this layer will override settings from
This computer and
Solution team-shared layers.
Do not put the %SolutionName%.sln.DotSettings.user file under a VCS to prevent sharing your personal settings with your team.
By default, all settings layers are empty and ReSharper applies settings from the default layer that is not displayed in this dialog box. As soon as you modify a particular setting and save it in one of the settings layers it overrides the default setting value as explained below.
ReSharper creates a file for particular settings layer only after you modify some setting and save it in this layer.
The settings layers apply in the order they are displayed in this dialog box: the upper layers apply after the lower layers. If a setting is not defined in the upper layer, ReSharper takes its value from the lower layer. If a setting is not defined in any layer, ReSharper takes its value from the default layer. To better understand how it works, consider the following example.
Imagine that we have three color settings
Setting B, and
and there are three settings layers
Layer 2, and
Layer 3) applied in the corresponding order:
The Default Layer represents the default hard-coded values that are defined in ReSharper for each setting. In our example, we can see that all values are "blue" by default. We can also see that:
- The Setting A is defined in Layer 2 as 'yellow' and this value overrides the default value and apply in the resulted settings.
- The Setting B is not defined in any layers, therefore, the default value 'blue' apply in the resulted settings.
- The Setting C is defined in two layers: Layer 1 and Layer 3, but according to the order of the layers, the value 'red' defined in the upper Layer 3 is applied in the resulted settings.
The default settings layer is not shown in this dialog box. The settings from this layer are applied after you click Reset All Settings.
The Settings Layers dialog box has the following controls:
|Import/Export Settings||Provides a drop-down list with import and export commands. For more information, see Managing and Sharing Options.|
|Copy Settings To||With this drop-down list, you can copy settings from the selected layer to any other layer.|
|Reset All Settings||Clears values for all settings in all settings layers. After applying this command, ReSharper apply values defined in the default settings layer. Be careful with this command, as together with other settings, you will lose custom Code Templates and custom pattens for Structural Search and Replace.|
|Add Layer||This button allows you to add a custom settings layer by creating a new one or opening a settings file.|
Click this button next to a particular layer to open the
ReSharper Options dialog box in the
layer mode to configure values for the settings in this layer. The
layer mode is indicated in the
Options dialog box by the name of the layer displayed in the upper-left corner:
|Move Up/Move down||These buttons allow moving up and down custom settings layers within a major layer group. By moving the layers you can change the order they are applied. (see the example above). Note that these buttons are active only when a custom layer is selected; you cannot move the major settings layers.|
|Options||Opens the ReSharper Options dialog box where you can configure values for the settings.|
You may use this dialog box when you: