Search code examples
c#visual-studio-2017visual-studio-communityeditorconfig

Changing code block preferences for properties to prefer block body (using .editorconfig file)


In my .editorconfig file I have this line csharp_style_expression_bodied_properties = false:suggestion but whenever I try to apply the quick actions suggestion to use it, it doesn't work and it causes a problem.

Here is the message that I have got: enter image description here

I am using the following version of Visual Studio: Microsoft Visual Studio Community 2017 version 15.2 (26430.16)


Solution

  • csharp_style_expression_bodied_properties = false:suggestion is working perfectly now.

    The problem seems to be solved now but I don't know how it was fixed.

    Note that I am using the following version of Visual Studio now: Microsoft Visual Studio Community 2017 version 15.3.3