简体   繁体   中英

Visual Studio 2017 XAML Designer Has No Syntax Highlighting

So I just upgraded to Visual Studio 2017, and sure enough I encountered a few problems. The most recent one is the XAML designer is refusing to show colored syntax highlighting. Here's a picture:

在此输入图像描述

I have tried resetting my settings through Tools->Import and Export Settings->Reset All Settings. However, this did nothing but reset my layout. Is anyone else experiencing this? How can I fix it?

I think the font's or the settings for the XAML highlighting are missing. The easiest thing that I suggest you trying, which is already available to you is:

1)Go to Start

2)Search and run Visual Studio Installer
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vs_installer.exe"

3)You are going to have 3 options depending on the version you have installed

4)You will have 3 Buttons. Click the hamburger menu button (3rd).
在此输入图像描述

5)Select Repair.

That should repair the installation and I believe it should work just fine!

I see you already have an accepted answer but I have discovered a much easier way to resolve the issue that worked for me on both of the machines where I was being affected by it.

I simply opened up Tools -> Options, expanded Environment, clicked on Fonts and Colors and then changed my Theme from Dark to Blue and clicked OK.

The XAML window then reflected the new settings and had proper syntax highlighting. I then switched it back to Dark (because real developers use a dark theme) and the syntax highlighting has worked ever since.

Good luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM