I’m using Visual Studio 17.6.2. When I open an XML file, only the first line of the file is properly color coded. The rest of the XML file is color coded all the same: black. Where is the setting for color coding XML?
[Just realized I wrote this answer about vscode rather than visual studio. There’s a good chance the same reason (line too long) applies, so I’ll leave this here. I do not use visual studio.]
Starting at line 2, your XML is all on a single line, which is too long for color coding.
2
Answers
In visual studio go to:
tools > options > environment > Fonts and color
On fonts and color tab:
Set Show setting for = text editor
under display items list, there are XML attributes at the end of the list.
Select the desired attribute and change its properties, on the right.
The available properties to update, for each item are:
[Just realized I wrote this answer about vscode rather than visual studio. There’s a good chance the same reason (line too long) applies, so I’ll leave this here. I do not use visual studio.]
Starting at line 2, your XML is all on a single line, which is too long for color coding.
The XML will now be color coded.