Type: Bug
Issue Description
When I make code changes to a .cshtml file, any minor text change, the linter flags errors on nearly every line. If I restart VS Code the error flags clear. For example, I added a
block and now text above the block and below are showing random red error squiggle lines.
Steps to Reproduce
The file contains HTML and Razor shorthdand. I add an HTML element and the error flags fill the page.
Expected Behavior
No error flags on valid code.
Actual Behavior
Error flags on valid code.
Extension version: 2.140.9
VS Code version: Code 1.136.2 (88e44fa0e00b08f7758b4f6d05632e4fd5e4df6f, 2026-09-04T21:40:42Z)
OS version: Windows_NT x64 10.0.26200
Modes:
Logs
C# log
Details
2026-09-08 14:09:52.491 [info] Locating .NET runtime version 10.0.5
2026-09-08 14:09:53.844 [info] Dotnet path: C:\Program Files\dotnet\dotnet.exe
2026-09-08 14:09:53.844 [info] Activating C# + C# Dev Kit...
2026-09-08 14:09:54.559 [info] info: Program[0]
2026-09-08 14:09:54.559 [info] Server started with process ID 34868
2026-09-08 14:09:55.289 [info] [Program] Language server initialized
2026-09-08 14:09:55.290 [info] [Program] Monitoring client process 30596 for exit
2026-09-08 14:09:55.707 [info] [initialized] [Microsoft.CodeAnalysis.LanguageServer.FileBasedPrograms.FileBasedProgramsEntryPointDiscovery] Finished discovery in 'c:\Users\e174835\Documents\customapps-repo\OpsLog.NET' in 7 milliseconds
2026-09-08 14:09:59.154 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project C:\Users\e174835\Documents\customapps-repo\OpsLog.NET\OpsLog.csproj loaded by C# Dev Kit
2026-09-08 14:11:01.889 [error] Request textDocument/formatting failed.
Message: 'end' must not be less than 'start'. start='959' end='958'. (Parameter 'end')
Code: -32000
[object Object]
C# LSP Trace Logs log
Details
Environment Information
VSCode version: 1.136.2
C# Extension: 2.140.9
Using OmniSharp: false
Dotnet Information
.NET SDK:
Version: 10.0.302
Commit: 35b593bebf
Workload version: 10.0.300-manifests.714b12c0
MSBuild version: 18.6.11+35b593beb
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26200
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.302\
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 10.0.10
Architecture: x64
Commit: f7d90799ce
.NET SDKs installed:
8.0.420 [C:\Program Files\dotnet\sdk]
10.0.302 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
DOTNET_CLI_UI_LANGUAGE [en-US]
DOTNET_MULTILEVEL_LOOKUP [0]
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Visual Studio Code Extensions
| Extension |
Author |
Version |
Folder Name |
| csdevkit |
ms-dotnettools |
3.20.199 |
ms-dotnettools.csdevkit-3.20.199-win32-x64 |
| csharp |
ms-dotnettools |
2.140.9 |
ms-dotnettools.csharp-2.140.9-win32-x64 |
| powershell |
ms-vscode |
2025.4.0 |
ms-vscode.powershell-2025.4.0 |
| vscode-dotnet-runtime |
ms-dotnettools |
3.1.0 |
ms-dotnettools.vscode-dotnet-runtime-3.1.0 |
C# Settings
| Setting |
Value |
| preferCSharpExtension |
false |
| compilerDiagnosticScope |
openFiles |
| analyzerDiagnosticScope |
openFiles |
| enableXamlTools |
true |
| useServerGC |
true |
System Info
| Item |
Value |
| CPUs |
13th Gen Intel(R) Core(TM) i7-13700 (24 x 2112) |
| GPU Status |
2d_canvas: enabled GPU0: VENDOR= 0x8086, DEVICE=0xa780 [Intel(R) UHD Graphics 770], DRIVER_VENDOR=Intel, DRIVER_VERSION=32.0.101.7077 ACTIVE GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8972 Machine model name: Machine model version: direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off trees_in_viz: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) |
undefined |
| Memory (System) |
15.70GB (2.69GB free) |
| Process Argv |
--crash-reporter-id 298a3818-57d5-4a4b-b81c-3ecd8a0533e3 |
| Screen Reader |
no |
| VM |
0% |
A/B Experiments
vsliv368:30146709
vswsl492:30256859
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
478i5457:31544283
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
cp_cls_t_1081:31454832
conptydll_true:31498968
e9c30283:31461165
46204921:31447328
ei9d7968:31496641
chat:31457767
8hig5102:31480529
89g7j272:31518289
i2gc6536:31499202
52612955:31516516
23c7c724:31520045
ddid_t:31478206
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
a1ije391_t:31540920
jbcp_cls_pctr_t:31531130
cp_intellij_t_nes:31548657
jf4hg949:31526829
ahp-both-windows:31556933
ihg5j128:31534457
7g2b5551:31542111
nes-ex-cf-euporie-03:31542868
enable_editor_pane_layout:31569726
allow-none:31555437
ac562147:31564510
c7c27ce7:31554789
1h923230:31564177
0dg73464:31554319
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
0c1h4866:31566224
session-archive:31558132
5b8j3302:31564601
mangle-name-treatment:31572634
intellij_nes_preview_t:31580086
39a5d156:31574986
2bfb8b39:31576696
permission_prompt_control:1332567
ccr_pr_nudge_control:1319470
vsc_wsm_t:1340632
jidc7660:1370295
auto_mode_control:1367906
h5e14506_copy:1348995
1g5a5742:1379227
Type: Bug
Issue Description
When I make code changes to a .cshtml file, any minor text change, the linter flags errors on nearly every line. If I restart VS Code the error flags clear. For example, I added a
Steps to Reproduce
The file contains HTML and Razor shorthdand. I add an HTML element and the error flags fill the page.
Expected Behavior
No error flags on valid code.
Actual Behavior
Error flags on valid code.
Extension version: 2.140.9
VS Code version: Code 1.136.2 (88e44fa0e00b08f7758b4f6d05632e4fd5e4df6f, 2026-09-04T21:40:42Z)
OS version: Windows_NT x64 10.0.26200
Modes:
Logs
C# log
Details
C# LSP Trace Logs log
Details
Environment Information
VSCode version: 1.136.2
C# Extension: 2.140.9
Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 10.0.302 Commit: 35b593bebf Workload version: 10.0.300-manifests.714b12c0 MSBuild version: 18.6.11+35b593bebRuntime Environment:
OS Name: Windows
OS Version: 10.0.26200
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.302\
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 10.0.10
Architecture: x64
Commit: f7d90799ce
.NET SDKs installed:
8.0.420 [C:\Program Files\dotnet\sdk]
10.0.302 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
DOTNET_CLI_UI_LANGUAGE [en-US]
DOTNET_MULTILEVEL_LOOKUP [0]
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Visual Studio Code Extensions
C# Settings
System Info
GPU0: VENDOR= 0x8086, DEVICE=0xa780 [Intel(R) UHD Graphics 770], DRIVER_VENDOR=Intel, DRIVER_VERSION=32.0.101.7077 ACTIVE
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8972
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments