codemaid
codemaid copied to clipboard
partial class (of a public class) becoms internal
Environment
- Visual Studio version: [2022 Community]
- CodeMaid version: [example 12.0]
- Code language: [example C#]
Description
A partial class (of a public class) becomes internal
Steps to recreate
public partial class JobService : JobManager.JobManagerBase { [...] } partial class JobService { }
Current behavior
internal partial class JobService { }
Expected behavior
partial class JobService { }
Can confirm. This bug is really annoying; it causes error CS0262 "Partial declarations of 'JobService' have conflicting accessibility modifiers".
CodeMaid should not add an access modifier to a "partial" declaration.
Thank you for reporting the issue. I am able to reproduce it as well. There have been a number of issues related to access modifiers with VS2022 due to what appears to be breaking issues near the vsCMAccess API.
As a workaround in the meantime if you disable CodeMaid->Options->Cleaning->Insert->Insert explicit access modifiers on classes this will prevent the issue listed above.