115

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?
3
  • 3
    The main reason to include it would be to standardize across a team, from what I can tell. Otherwise, there's no reason.
    – Magus
    Commented Mar 6, 2014 at 19:57
  • 2
    I always exclude .user files as a rule, but really there's no standard answer here. Commented Mar 6, 2014 at 20:01
  • 2
    You're wrong @Magus, the .user file should never be checked in. You standardize aross a team by checking in the dotsettings file not ending with .user
    – Jim Aho
    Commented Jun 13, 2019 at 12:56

2 Answers 2

165

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.

16

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.

1
  • Really good explanation. Makes sense to use that reasoning to check in the DotSettings file for team level enforcement of settings though.
    – Ash
    Commented Dec 4, 2022 at 23:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.