At the DevDays 2010 in my session on Building Maintainable Applications, a question came up how to add custom words to Code Analysis. I’ve done that a couple of times, but couldn’t remember it from the top of my had. So, this is just a note-to-self.
- Add a XML file (e.g. CustomDictionary.xml) to your project
- Set the Build Action to CodeAnalysisDictionary
- Set Copy to Output Directory to Do not copy
If you put the xml file in the root install folder of Visual Studio, it’ll be applied to all projects. Alternatively, you could share a dictionary file using the Add as Link when adding files to a project.