VS Code Fails to Highlight Missing Symbol in @code Section of .razor File
I couldn’t debug my app and wasn’t sure why at first. The only error I got was:
Unable to launch browser: "Could not open wss://localhost:7171/_framework/debug/ws-proxy?browser=...Then I opened the solution in Rider, which pointed out the actual issue:
Cannot resolve symbol 'UseQuarterRequest'VS Code didn’t flag this at all. It is in the
@code
section of a .razor file.
Could there be something wrong with my VS Code setup?
This is on macOS.

8 Replies
Might be $vsdrunk
* close VS
* remove the hidden folder
.vs
* remove all bin
and obj
folder next to each csproj (DO NOT TOUCH THE .git
FOLDER OR WHAT'S INSIDE)
* restart vsvscode
Thanks for the suggestions – unfortunately, deleting the bin and obj folders didn’t solve the issue. (Since I’m using VS Code, there’s no .vs folder to remove either.)
It doesn't look like you're using semantic highlighting
That being said, it's rather hard to determine your issue with just what you've shown. Generally speaking, when Rider is giving you an error that
dotnet build
is not, Rider is wrongI just ran
dotnet build
, and it throws the following error:
SupportWorker.razor(94,27): error CS0246: The type or namespace name ‘UseQuarterRequest’ could not be found (are you missing a using directive or an assembly reference?)I also took a look at the Debug Console, and it shows the same error. The in-editor feedback seems to be a Rider-specific feature. Going forward, I’ll make sure to check the Debug Console or run
dotnet build
whenever I run into issues while using VS Code.@davidwengier, any ideas?
Would need logs to know more. Doesn’t look like anything much is working.