Sharing code-style settings between projects and computers

In Visual Studio, I could get a somewhat consistent code-style experience by using StyleCop and I took the .editorconfig file from dotnet/roslyn to use best-practice coding standards. I could disable specific warnings at file-level or at project-level. Worked pretty fine. I'd copy the .editorconfig file to new project and I'm good to go.

With Rider, it's giving a lot more options, but the options get scattered all around. I want AT LEAST the project to be consistent between booting in Linux or Windows on my own machine. The only way to do that in Rider is to save settings at the project-level. It creates an additional bunch of files, and it doubles down on the .editorconfig files already present in the projects and solution. Even there, I have a large project split in 5 solutions, with several shared projects. I save the settings at the solution level, and get inconsistent code-style settings between the various solutions using the same shared projects. It really is a mess.

So right now, settings are fragmented between:
- Solution .editorconfig
- Project .editorconfig exclusion rules
- Solution .DotSettings /.DotSettings.user files
- Files in .idea
- A bunch of solutions having different settings; and each time I create or access a new project, I need to re-configure all over again.

I'll fix all the warnings in Rider; and then if I re-open it back in Visual Studio, it's probably going to complain about tons of warnings all over again because it won't understand Rider's code styles and exclusion rules.

Is there a way to have a less fragmented experience? I don't care so much about customizing it to my specific tastes. I'd rather conform myself to standard best-practices.

2 comments
Comment actions Permalink

A bit of research led me to this page with a pretty good summary of the options.

https://stackoverflow.com/questions/59119077/share-code-style-settings-between-rider-and-resharper

There was a promise that things would get easier; but as of today, it's exactly as he described.

0
Comment actions Permalink

Hi! 

You can also use the Synchronize machine-wide Rider and ReSharper settings option to sync Rider and R# settings and the following ways to sync settings between Rider on different machines. 

I hope this helps. 

0

Please sign in to leave a comment.