How to set general ReSharper and code settings?

We would like to have general settings for the team editor in Visual Studio 2012. We use ReSharper.

Is there a way for all team members to have Visual Studio editor settings that they can import from the central file of the file?

What i tried

ReSharper describes how to have common settings in the "Management and Sharing Options" tutorial. This did not seem to work on my PC (the settings did not seem to be imported or exported properly). Furthermore, ReSharper does not seem to control things like tabs, so we are wondering how to import the editor settings for Visual Studio. Is it possible to have a single unified solution that allows a team to share editor settings?

+8
visual-studio-2012 resharper
source share
3 answers

I considered using the import and export settings in resharper to maintain consistent settings in the commands, however this was unfavorable because you had to import settings on each computer for each user account. For example, if you log in as another user on the same computer that is already configured, you need to reimport the settings.

General command settings

In the end, I selected Team Shared options that store the settings in your source repository (the file will be something like <solution name>.dotSettings . When you edit the settings in ReSharper, you will need to remember them in the Team settings.

enter image description here

You can also save Live files and templates in the solution. They will also be stored in the dotSettings file.

enter image description here

Override

This will not apply the same settings as developers can override on each user base, saving personal settings on their computer.

Stubbornly

As I mentioned, if you do not include files created by ReSharper in Source Control, the settings will not be saved in the command. Do not include <solution name>.dotsettings.user , as these are user settings and should not be included.

Several projects

If you want to have the same settings for several projects, you need to either copy the settings files and rename the file name to match the solution name, or import them. I think this works better than forcing the same settings across all teams, as it allows each team to decide how they want to work.

enter image description here

+9
source share

A little extra hint. You can also use separate settings for each project if you create a <projectname>.DotSetting . However, you do not have an interface for this. Useful, for example, to allow only underscores in unit test method names.

+5
source share

All .DotSettings files can be distributed as an extension for ReSharper.

You can publish the extension for the official NuGet feed from JetBrains to your private NuGet server or even to a shared folder. The obvious advantage is that you do not need to worry about updating the settings on each developer's computer (it will be automatically detected by ReSharper itself).

The extension is a regular NuGet package. So you need to:

  • Export settings to a file using the Control Settings dialog box
  • Write a .nuspec file
  • Create a .nupkg file using nuget.exe
  • Put the package in the feed
  • Configure R # to use the new feed

I have a walkthrough blog post .

+3
source share

All Articles