dotnet / dotnet/roslyn

Razor tools are crashing in VS 2026

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

Description

I’m opening this issue after a brief conversation with @danroth27.

I’m consistently running into problems with the Razor tools in Visual Studio, and I can reproduce them every single time.

Whenever I switch branches in a fairly large project, I receive the following error message:

Image

When I click **Reload**, all syntax highlighting for Razor components disappears:

Image

After a few minutes, the tooling may start working again, work only partially, or not recover at all—forcing me to restart Visual Studio. When the green squiggly lines begin to appear, it’s usually a sign that I’ll need to restart Visual Studio to continue working.

Image

I can reproduce it constantly by following this steps:

1. Clone https://github.com/microsoft/fluentui-blazor
2. Switch to the dev-v5 branch in VS
3. Select the solution file
4. Wait a few seconds

I believe this has something todo with the internal git tools as this is also happening sometimes when I revert a lot of changes in the active branch.

Contributor guide

Open the contributing guide

Research direction

Reproduce first by cloning microsoft/fluentui-blazor, switching to the dev-v5 branch in Visual Studio, selecting its solution, and waiting a few seconds. Then inspect the Razor tooling and internal Git integration implicated by branch switching and bulk reverts; done means the repro no longer crashes, Reload preserves Razor syntax highlighting, and the tooling recovers without restarting Visual Studio.

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
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.