Add dissallowed fields rule
MODIFY
.editorconfig
.editorconfig
@@ -136,11 +136,23 @@ dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_int
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
-dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal, protected
+dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
+# No other public/protected/protected_internal/private_protected fields are allowed
+dotnet_naming_rule.disallowed_fields_rule.severity = error
+dotnet_naming_rule.disallowed_fields_rule.symbols = disallowed_fields_symbols
+dotnet_naming_rule.disallowed_fields_rule.style = disallowed_fields_style
+
+dotnet_naming_symbols.disallowed_fields_symbols.applicable_kinds = field
+dotnet_naming_symbols.disallowed_fields_symbols.applicable_accessibilities = public, protected_internal, protected, private_protected
+# disallowed_fields_style - Anything that has this style applied is marked as disallowed
+dotnet_naming_style.disallowed_fields_style.capitalization = all_upper
+dotnet_naming_style.disallowed_fields_style.required_prefix = ____RULE_VIOLATION____
+dotnet_naming_style.disallowed_fields_style.required_suffix = ____RULE_VIOLATION____
+
# async methods should end with Async suffix
dotnet_naming_rule.async_methods_end_with_async.severity = warning
dotnet_naming_rule.async_methods_end_with_async.symbols = any_async_methods

Add dissallowed fields rule