9

While writing some C++ code in Visual Studio 2022. I misspelled a word in a comment and right clicked on it to select the correct spelling and accidentally clicked Add word to dictionary and added the misspelling to the dictionary.

How do I remove it from the dictionary?

1 Answer 1

8

There's a file called exclusion.dic in your %localappdata%\Microsoft\VisualStudio\<Version> directory

In my case: C:\Users\itsme\AppData\Local\Microsoft\VisualStudio\17.0_ebf473c1\exclusion.dic

It's a simple text file which can be edited:
enter image description here

Using the explorer search to find the file in on of the sub directories of %localappdata%\Microsoft\VisualStudio might help:
enter image description here

Exclusion Dictionary Encoding

Another issue many folks ran into was around the encoding of the exclusion dictionaries used by the spell checker. Visual Studio will use the exclusion dictionary specified by the spelling_exclusion_path switch in your editorconfig file or an “exclusion.dic” file in your %localappdata%\Microsoft\VisualStudio<Version> directory if a switch can’t be found. In either case, the spell-checking APIs required the exclusion file to have “UTF-16 with BOM” encoding to work correctly. We got multiple reports of the encoding becoming corrupted, particularly when users manually modified these files to remove excluded words.

2
  • I'm not seeing any file named exclusion.dic in that directory. Apr 13 at 18:13
  • The "UTF-16 with BOM" issue is not an issue anymore. The article that you link to has been amended to state that this particular issue has been fixed. So, the current situation is that the Visual Studio spell checker DOES NOT WORK (is buggy to the point of being unusable) regardless of whether your "exclusion.dic" file is encoded as "UTF-16 with BOM" or not.
    – Mike Nakis
    Sep 19 at 10:45

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.