Do I need to maintain ReSharper's dotsettings.user file in Source Control?

C#Version ControlResharper

C# Problem Overview


I noticed ReSharper has created a dotsettings.user in my Source folder.

file.sln.dotSettings.user

  1. Do I need to keep this in my Source Control (TFS)?
  2. If I exclude it, what are the consequences?
  3. If I get latest on another machine, will my customized ReSharper settings be lost? Or does ReSharper re-create the settings from some other local file?

C# Solutions


Solution 1 - C#

No, the dotSettings.user file should be excluded from source control. It has user specific information in it, and shouldn't be shared, e.g. bookmarks, unit test session windows.

The .dotSettings contains project or solution specific settings that can be shared with the team, e.g. naming standards or braces layout. If you wish to share these amongst teams then the file should be included.

Solution 2 - C#

No, you shouldn't do so, as ReSharper Help says.

> The corresponding settings file .sln.DotSettings is saved in the solution folder. > > As soon as this file is added to your VCS and the team members get it, they will have settings from this file applied automatically without reloading the solution.1 > > The corresponding settings file .sln.DotSettings.user is saved in the solution folder. You should not add it to your VCS.2

The article explains ReSharper setting layers in details, which answers your questions as well.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionShivaView Question on Stackoverflow
Solution 1 - C#citizenmattView Answer on Stackoverflow
Solution 2 - C#Kexy BiscuitView Answer on Stackoverflow