I have some separated solutions in my hard disk. And I have configured my Visual Studio 2022 like this:
But one of them (the oldest one) does not follow the configuration. This is what happens, after applying Code Clean-up, even if the method was expression-bodied:
Note: I have not .editorconfig in solution folder (in hard and solution explorer)
I want my solution to follow my configuration as the other solutions.
I finally found why is that happening. Actually I don't know why. But now, I know how to fix it. All I had to do was commenting the following line in .csproj
file:
<!--<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>-->
And done!!!