I find it important to have a common development environment in our team. This allows us to easily switch seats during the sprints. ReSharper has a lot of customizable features, and we just figured out how to share these.
If your team agrees to name all local variables with a prefix of "local" (which I wouldn't advise, but hey, the team decides), you can set that in Re#. This will not enforce anything, it will just provide you with default choices. The result will look like this:
These code conventions are simple to share. Just check "Shared across the team" under "Code style sharing", and you've got a common code style definition in Re#. This will create a file next to your Solution called "projectName.4.1.resharper". You will have to add this file to your source control.
Templates are another beast, and it took us quite a while to figure them out. In Re# you've got File Templates, Surround Templates and Live Templates. These can all be shared separately. For this, you first need to export a file containing the templates you like. This file needs to be source controlled. Then you need to mount (not import) the exported file explicitly.
First, you open your templates window. There, you export the template you want to share as a source controlled file by hitting the export button. You save this file and add it to source control.
Then, on all PC's in your team, you mount the file by hitting the mount button. This will mount the source controlled template file. This mounted file appears in your templates window now. From now on, whenever someone edits this mounted file, the other team members get the new templates.
- When you modify a template, Re# doesn't save it unless you explicitly tell it to. It will only save the file when you quit visual studio.
- If you use TFS, visual studio won't check out the template automatically. This means that you will have to manually check out the file, edit it, then check it back in manually. This isn't a big issue, but it's still a nuisance.
- Re# will only load the template file when you open visual studio.
This last note actually causes a chicken-and-egg problem. My daily routine is as follows: open visual studio (== load the file template), get the latest version from TFS (== update the file template). This means that I first load the template, then get the latest version of the template on disk. If you want to reload it, you have two choices: restart VS, or go to the templates explorer and reload the template explicitly.
This would not be a problem with SVN of course.