codemaid
codemaid copied to clipboard
Cleanup removes "fixed" keyword
Environment
- Visual Studio version:2022 Professional 17.0.0.
- CodeMaid version: 12.0
- Code language: C#
Description
When cleaning this block
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 8)]
public unsafe struct USER_PROPERTIES
{
public BOOL anonymerBenutzer;
public BOOL managerBerechtigung;
public BOOL kannPasswortNichtAendern;
public BOOL mussPasswortAendern;
public BOOL auswahlMitPfadAngabe;
public BOOL netzAnmeldung;
public BOOL netzNameIdentisch;
public BOOL darfVertreterWaehlen;
public fixed byte fullName[64];
public fixed byte netzName[64];
}
[CodeMaid.config.zip](https://github.com/codecadwallader/codemaid/files/7557142/CodeMaid.config.zip)
the keyword "fixed" is removed which results in compilation error.
See settings attached.
Thanks for reporting the issue. I am able to reproduce it. It seems to be caused by the setting at CodeMaid->Options->Cleaning->Insert->Insert explicit access modifiers on fields. There are other similar bug reports where trying to check the access modifier is causing a side effect in VS2022's APIs. As a workaround you could disable this option for the time being.
Ran into the same problem in VS22 today.
Similarly, it's removing readonly on properties.