简体   繁体   中英

Code Cleanup in Visual Studio 2022 For One Solution Only

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!!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM