我是否需要在源代码管理中维护 ReSharper 的 dotsetings.user 文件?

我注意到 ReSharper 在我的 Source 文件夹中创建了一个 dotsettings.user

file.sln.dotSettings.user

  1. 我是否需要将它保存在我的源代码管理(TFS)中?
  2. 如果我排除它,会有什么后果?
  3. 如果我得到最新的另一台机器,我的定制 ReSharper 设置会丢失吗?还是 ReSharper 从其他本地文件重新创建设置?
32781 次浏览

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.

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.