ReSharper 6.1 Settings: DropBox and Company-wide
This post is about ReSharper 6.1. For other features in ReSharper 6 (both 6.0 and 6.1), please see previous posts introducing ReSharper 6:
- CSS Support in ReSharper 6
- ReSharper 6 Bundles Decompiler, Free Standalone Tool to Follow
- ReSharper 6 Enhances Suggestions with Explanations
- ReSharper 6 Enhances Razor Support
- File Header Macros in ReSharper 6
- ReSharper 6.1 EAP Opens: Much more than a bugfix
- ReSharper Settings in 6.1
- Async CTP Support in ReSharper 6.1
EAP Warning: This post is based on ReSharper 6.1 Early Access Program and some things such as screenshots and minor details might vary from the time this has been written to the time of release.
In a previous post on ReSharper 6.1 Settings, we introduced the concept of layers and covered a few scenarios when it comes to sharing of settings across solutions. In this post we’re going to cover a few more, namely: syncing settings over DropBox and providing a global setting for all projects across a company.
Syncing with DropBox
As developers we often end up working on multiple machines, whether it is that we own a desktop and laptop, or two desktops, one at work and one at home, or any other combination of scenarios, we have the need to alternate between machines. With the new layers settings in ReSharper 6.1, sharing the same settings in these cases has now become quite easy.
The idea is simple: add a new Global Layer and host the file in a DropBox folder (I’m using DropBox, but obviously you can use any other mechanism that syncs files remotely). In order to do this, we first need to export the current settings to that new file and then mount it.
- Click ReSharper | Manage Options…
- Select the Global Settings and click on Export to File. It will prompt for a filename. The idea is to place this file in a Dropbox folder. Select everything from the following screen except Housekeeping
It is important to note that only items that currently have non-default values will be displayed in this window. For instance, under PattersnAndTemplates, we’d see an entry of StructuredSearch if we were to have some custom patterns in the current context, as shown below
- Select Add Layer | Existing File and select the file created in the previous step.
[Note: This screen will most likely be updated in a future release to combine the “ReSharper Global Settings” under the group header as this is a default layer that cannot be removed and therefore cannot intervene in normal operation such as priority]
We now have to repeat step 3 for each of our machines. Once we do that, the settings will automatically be loaded every time DropBox syncs.
Providing Company-Wide Settings
It should be pretty apparent that providing company-wide settings across all projects is pretty much the same as sharing via DropBox. We just need to provide a file. If we want to provide solution company-wide settings, we’d add the layer to the solution group. This would allow an alternative way of sharing settings which wouldn’t require the file to be checked in to source control.
Other operations to perform with Settings
Settings can be imported, exported, activated and deactivated (marking the checkbox or unchecking) at any point. We can also Copy To button to copy settings from one layer to another layer, making it also easy for sharing. In essence you can do pretty much anything you like now.
Why so many layers?
You might be thinking, if I could setup my settings to read from a specific file, why would I want more layers or the ability to order them in priority?. The idea with layers is that each one can add one or more configuration settings. This means that for instance a company could have a layer where only code formatting settings are defined, another layer where templates are defined and so on and so forth. When we export settings to a file as shown in two, we define which settings we want exported. We do not have to select them all like we did previously. We could for instance only choose to export Templates, and mount a layer where only these are defined. ReSharper can understand that there are different options in different layers and provides us access to them all. We don’t have to worry about this. The only thing we might need to take into account is if one layer overrides another one’s settings. That’s where the Move Up / Move Down comes in, allowing us to specify the priority.
The layers provide a lot of flexibility when it comes to sharing settings, either between two machines, a team or company-wide. Use them, abuse them. Give us your feedback.
Subscribe to Blog updates
Thanks, we've got you!