Share code style settings between Rider and ReSharper
Asked Answered
R

2

10

Is there an easy way to export/share my Rider code style settings and use those in ReSharper (VS) and vice versa?

Rotunda answered 30/11, 2019 at 18:32 Comment(2)
. editorconfig would work, but it doesn't cover all possible settingsGroot
@IvanShakhov In 2019.3 with addition of naming style it should finally cover all code style settings AFAIK. But it doesn't cover other settings like code completion, typing assists, etc.Othello
O
16

You have three ways of doing it:

  1. Manual export/import. In Rider: File > Settings > Manage Layers > This Computer > right-click > Export to file > select CodeStyle, CodeInspection and maybe other settings your need. In ReSharper: Extensions > ReSharper > Manage Options > This computer > right-click > Import from file.
    That would work provided that you never saved your settings to solution layers, but given your question, I think that's unlikely.
  2. Shared solution settings. They would allow you to bind your code style setting to your solution and commit them to VCS like Git, and would work across all Rider/ReSharper installations, even for your team mates who open that solution. But if you create another solution, then you have to resort again to manual sync between them. In Rider: File > Settings > Manage Layers > This Computer > right-click > Copy settings to > solution ... team-shared. Then if you want to change shared settings, don't forget to use down arrow near Save button and select "Solution ... team-shared" (would be easier in next versions, I promise :) ).
  3. .editorconfig file. It would allow you to share your code style settings not only between Rider/ReSharper, but also partially for plain Visual Studio/Visual Studio Code installations for all solutions that are placed under a folder in the file system where you place your .editorconfig. Of course, you can also commit it to VCS. But you can't put there non-code-style settings (like typing assists, code completion, etc). In Rider: File > Settings > Code Style > click Export button near "Enable EditorConfig support". Then if you want to change your code style settings, click Help > Find action (usually mapped to Ctrl-Shift-A) and type "Edit .editorconfig" (again, would be easier in next versions, I promise).
Othello answered 2/12, 2019 at 1:43 Comment(1)
For #2, "Manage Layers" is a button at the bottom left of the settings window, and you should right click "This Computer"Genuflect
D
0

Below is the option you can use in Rider 2024.1.5 concerning Rider-R# settings sync. (I'm not sure when exactly it was introduced).

enter image description here

Doughnut answered 9/9, 2024 at 14:56 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.