79357489

Date: 2025-01-15 08:25:43
Score: 0.5
Natty:
Report link

I had the exact same issue. I dont know what caused Visual Studio to "forget" my naming rule, but removing it and adding it back again fixed it for me.

So:

  1. Go to Options -> Text Editor -> C# -> Code Style -> Naming
  2. Remove the "Private or Internal Field" naming specification
  3. Click Manage naming styles
  4. Remove the naming style (mine was named "_fieldName")
  5. Click OK
  6. Restart Visual Studio

Then open Visual Studio and add them back again

Some screenshots if you forgot how it looked like:

enter image description here

enter image description here

Reasons:
  • Probably link only (1):
  • No code block (0.5):
  • High reputation (-1):
Posted by: Marcus