codemaid
codemaid copied to clipboard
CodeMaid removes commented annotations in second lines in C#
Environment
- Visual Studio version: 2022
- CodeMaid version: 12.0
- Code language: C#
Description
CodeMaid is removing commented Annotation configuration, located after first line, which I need it to be there. This behavior doesn't show up if the annotation is in first line. As you see this comment get's removed because it is not first line:
[Route("api/[controller]")]
[ApiController]
// [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy = "cmx")]
public class ServiceFileController : ControllerBaseExt
{ ....
Steps to recreate
- Enable Automatic Cleanup on Save
- Comment Annotations in Second line
- Save the file.
- The commented Annotation gets deleted.
Current behavior
I unchecked format cleanup in CodeMaid Options setting: Formatting-->Cleanup-->Run format comments during cleanup but still see the same behavior.
Expected behavior
Don't remove the commented annotation on save after first line.
Thanks for reporting the issue. I am able to reproduce it. This appears to be tied to the same SDK bug from #879. Please check that issue out for more information and a workaround.