dotnet / dotnet/roslyn

C#/Razor syntax highlight is missing for portions of text

Open
#85,572 2 comments 0 reactions 0 assignees View on GitHub
Area-Razor
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

VS 17.12 P5 (no extensions enabled)

![Image](https://github.com/user-attachments/assets/af50597f-a579-4663-8fb7-4bab003d363f)

- Outlining, document structure, quick info, brace matching all work
- Except syntax highlighting for C# and Razor components (although it highlights `@`). HTML seems to work too.

Making an edit invalidates the bad state and syntax highlighting comes back.

Contributor guide

Open the contributing guide

Research direction

Reproduce the report in Visual Studio 17.12 P5 with no extensions enabled, using a document containing C# and Razor components. Compare syntax highlighting with the working HTML highlighting, then edit the document to confirm that the bad state is invalidated. Done means C# and Razor portions remain correctly highlighted without requiring an edit.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.