How can I get Visual Studio to give me a naming warning each time I create an async method that doesn't end "Async"? It's the recommended convention for async methods but I often find myself forgetting to add that suffix and a warning would be useful.
- Go to Text Editor => Basic => Code Style => Naming
- Select Manage Specifications and Add New Specification
- Select Method, Tick All Accessability Options and From Modifiers Select Async
- Give Title as Async Method and save
- Now get into Manage Naming Styles and Add New Style add Async as Suffix and Give it a name as AsyncSuffix then save
- Now press plus sign and create new naming, Select specification as Async Method, select required Syle as AsyncPostfix and Severity as Suggestor.
- Click Ok and save