Skip to content

Cshtml references not properly shown #9804

Open
@bogdan-iuga

Description

@bogdan-iuga

Type: Bug

Issue Description
In a web MVC project, Go to References does not always find a field referenced in a *.Cshtml file.
After opening a Cshtml file that contains a reference to said field, Go to References now sees the Cshtml reference, but does not allow you to open the file.

  1. Here you can see that the cshtml references are not shown for the NumberOfResults field.
dotnet-issue-no-reference
  1. After opening the Index.cshtml file, Go to References now shows the cshtml references.
Screenshot 2024-01-09 at 13 04 03
  1. Trying to open one of the references results in another error.
Screenshot 2024-01-09 at 13 06 46

Expected behavior
I'd expect the Go to References to:

  1. show all the references (even the cshtml ones)
  2. be able to navigate to the references in the cshtml files.

Environment information

Extension version: 2.14.8
VS Code version: Code 1.85.1 (Universal) (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:48:06.308Z)
OS version: Darwin arm64 23.2.0
Modes:

System Info
Item Value
CPUs Apple M2 Max (12 x 24)
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 5, 2, 2
Memory (System) 32.00GB (2.14GB free)
Process Argv
Screen Reader no
VM 0%

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions