Skip to content

Issue when file opened in workspace/folder (even when closed) is renamed to have different capitalisation #8400

@hamarb123

Description

@hamarb123

Type: Bug

Issue Description

Errors & warnings, specifically, break for a file when its capitalisation is changed if that file was previously opened in the workspace/folder (regardless of whether workspace/folder is open - but brokenness state only changes on re-open).

Steps to Reproduce

  1. Create a blank classlib solution + project in a folder that is on a volume which allows you to refer to paths by any case. Note: space is not necessary in the path name.
  2. Open the folder containing the solution & project in VS Code, and open the Class1.cs file.
  3. Add the text "error" in, this should make an error.
  4. Close VS Code.
  5. Rename the file to class1.cs.
  6. Re-open the folder in VS Code.
  7. You might see the syntax error briefly, but it will quickly disappear.

My environment is macOS, not sure if it repros on other OSes also.

Expected Behavior

LSP reports an error on "error"

Actual Behavior

No error is reported, but the LSP reports errors in the C# log.

Image

Logs

C# log

C# LSP Trace Logs

Environment information

VSCode version: 1.101.2
C# Extension: 2.84.19
Using OmniSharp: false

Dotnet Information .NET SDK: Version: 9.0.300 Commit: 15606fe0a8 Workload version: 9.0.300-manifests.e42facbb MSBuild version: 17.14.5+edd3bbf37

Runtime Environment:
OS Name: Mac OS X
OS Version: 15.5
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/9.0.300/

.NET workloads installed:
[macos]
Installation Source: SDK 9.0.300
Manifest Version: 15.5.9199/9.0.100
Manifest Path: /usr/local/share/dotnet/sdk-manifests/9.0.100/microsoft.net.sdk.macos/15.5.9199/WorkloadManifest.json
Install Type: FileBased

Configured to use loose manifests when installing new manifests.

Host:
Version: 9.0.5
Architecture: arm64
Commit: e36e4d1a8f

.NET SDKs installed:
6.0.428 [/usr/local/share/dotnet/sdk]
7.0.410 [/usr/local/share/dotnet/sdk]
8.0.407 [/usr/local/share/dotnet/sdk]
9.0.202 [/usr/local/share/dotnet/sdk]
9.0.300 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.36 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.14 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.14 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
x64 [/usr/local/share/dotnet/x64]
registered at [/etc/dotnet/install_location_x64]

Environment variables:
Not set

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 1.30.32 ms-dotnettools.csdevkit-1.30.32-darwin-arm64
csharp ms-dotnettools 2.84.19 ms-dotnettools.csharp-2.84.19-darwin-arm64
dark-modern-oled-theme-set Binary-Ink 1.3.7 binary-ink.dark-modern-oled-theme-set-1.3.7
vscode-dotnet-runtime ms-dotnettools 2.3.6 ms-dotnettools.vscode-dotnet-runtime-2.3.6

Extension version: 2.84.19
VS Code version: Code 1.101.2 (Universal) (2901c5ac6db8a986a5666c3af51ff804d05af0d4, 2025-06-24T20:27:15.391Z)
OS version: Darwin arm64 24.5.0
Modes:

System Info
Item Value
CPUs Apple M2 (8 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 3, 5, 5
Memory (System) 16.00GB (0.07GB free)
Process Argv --crash-reporter-id f4ebe422-3f6d-48ac-901b-5120de548864
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31333650
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
pythonpulldiag:31335739
996jf627:31283433
pythonrdcb7cf:31303019
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
747dc170:31275177
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
j6a0c355:31339598
jhi8h917:31341130
i851h500:31338111
usemarketplace:31336439
nesew2to5:31336538
agentclaude:31335815
4f60g487:31327383
nes-diff-11:31337487
6abeh943:31336334
yijiwantestdri0626-t:31336930

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions