Cannot navigate to symbol references found in *.cshtml
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 737
- Avg merge
- 18h 40m
- Merged PRs (30d)
- 31
Description
## Issue Description ##
Go to References _finds_ C# symbol references that are in my Razor views, but cannot _navigate_ to them.
## Steps to Reproduce ##
1. In a C# source file, caret to a symbol which is used in a Razor view
2. Invoke Go to References.
3. The *.cshtml reference will be shown (with a `...\obj\CodeGen\Views\...` path)
4. Choose the *.cshtml reference found
## Expected Behavior ##
I'd expect it to open and navigate into the original *.cshtml file.
## Actual Behavior ##
It tries to open a codebehind file, which is not found.
## Environment information ##
**VSCode version**: 1.71.2
**C# Extension**: 1.25.0
Dotnet Information
.NET SDK (reflecting any global.json):
Version: 5.0.302
Commit: c005824e35
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.302\
Host (useful for support):
Version: 6.0.0
Commit: 4822e3c3aa
.NET SDKs installed:
5.1.101 [C:\Program Files\dotnet\sdk]
6.0.302 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
|Extension|Author|Version|
|---|---|---|
|basic-dark-color-theme|spazmodius|0.0.4|
|csharp|ms-dotnettools|1.25.0|
|fracturedjsonvsc|j-brooke|2.2.2|
|shifter|Gruntfuggly|0.0.6|
|TabOut|albert|0.2.1|
|vscode-eslint|dbaeumer|2.2.6|
|vscode-markdown-footnote|houkanshan|1.0.0|
|vscode-navigate-edit-history|codeandstuff|1.6.0|
|vscode-open-in-github|sysoev|1.17.0|
|vscode-toggle-quotes|BriteSnow|0.3.6|
|xml|DotJoshJohnson|2.5.1|;
Contributor guide
Assessment
This issue has not been assessed yet.