I am not so happy with primary constructors - because the constructor parameters are not readonly, it's too error prone in my opinion, especially when working with base classes which receive their own copy of the constructor parameters.
However Visual Studio and Resharper both recommend me to use primary constructors. I find that quite annoying. How can I disable such recommendations? Or even better, add a check reporting found primary constructors so I can't accidently create them?
Try adding
.editorconfig
file withcsharp_style_prefer_primary_constructors
set to false:Or alternatively disable the rule by the code:
See also the Use primary constructor (IDE0290) rule doc.