I still cannot reproduce the problem after a few attempts and long sessions. However I found these issues that seem related:
- Attempted TextBuffer edit operation while another edit is in progress + memory leak + crash · Issue #80832 · dotnet/roslyn · GitHub - concurrent TextBuffer edit conflicts causing editor lock and crashes. Fixed in recent builds.
- Razor ist not working with any constellation of extensions · Issue #9292 · dotnet/razor · GitHub - SourceText boundary misalignment. Fixed via cohosting architecture.
- Razor tools are crashing in VS 2026 · Issue #12681 · dotnet/razor · GitHub - Razor tools crashing in VS 2026, confirmed VS platform bug.