Options Layers

CodeRush stores Configuration Options in several layers, which allows you to define several configuration sets and switch between them.

You can use this feature to store solution-dependent options and share them with your team. These options are applied automatically when opening a solution.

CodeRush determines the actual configuration by merging all layers.

There are three predefined layers.

Name Priority Description Location Which Options to Store
Solution Personal Highest Your preferences for the current solution Solution directory (.cr\personal), should be excluded from VCS Solution Team options you need to override
Solution Team Middle Preferences shared with the team Solution directory (.cr\team), should be included in VCS Code Style, Code Analysis options, etc.
Personal Lowest Your default preferences for all solutions you work with User's AppData directory Coding Assistance, Visualization options, etc.

Options defined in higher priority layers override the corresponding options defined in lower priority layers. The table below shows an example of layer merging.

Option Default Personal Solution Team Solution Personal Merged
Enable Debug Visualizer true undefined undefined undefined true
Enable Smart Semicolon false true undefined undefined true
Right Margin Value 120 160 80 undefined 80
Local declaration style Use implicit undefined Use explicit undefined Use explicit
Apply variable declaration style false true true false false

Editing Layers

You can manage options layers using the Options Layers window invoked by clicking the CodeRush | Options Layers… menu item.


Double-click a layer to edit its configuration. CodeRush stores only options whose values are different from the default ones. Refer to the Storing a Default Value in a Layer section to learn how to store a default value.

The CodeRush | Options menu item opens Merged Options, which allows you to modify any layer.


Storing a Default Value in a Layer

When editing a layer using the Options Layers window, you can store only values different from the default ones. To override an option value stored in the Solution Team layer with the default value, store the default value in the Solution Personal layer. You can do it from the Merged Options window (CodeRush | Options menu) by modifying the option and saving changes into the Solution Personal layer.

Custom Layers

You can add child options layers to any predefined layer. The base layer options are prioritized over the child layers, which means you cannot use these layers to override the base layer options.

Custom layers can be stored in any directory and used to specify options undefined in the base layer.

Use the plus (+) button to add a child layer to the current base layer.

You can reorder the custom layers: use arrow buttons to change their priority. The cross (x) button is used to remove the selected custom layer.

See Also