I am working on a project in Visual Studio, and I encountered a problem where the editor doesn’t display error messages for certain issues, such as when a product does not exist in the code. I expected VS to highlight the line with the error, but this isn’t happening.
Image of error
Question posted in Visual Studio Code
View the official documentation.
View the official documentation.
2
Answers
I have had this issue many times, are you using v12+ VS 2022? For me I had to go to Tools > Options > Text Editor > C# > Advanced > Editor Help and check [] Enable all features in opened files from source generators.
From looking at your screenshot, looks like you are configuring POST route parameter binding with C#. For this issue, please try the following:
1.Please enable
Show error squiggles
option under Tools -> Options -> Text Editor -> General2.Run the following command at Developer Command Prompt for VS(e.g:2022)to restore your Visual Studio default setting.
3.Close all running VS instances and delete the hidden
.vs
, bin and obj folders in the project folder, then rebuild the project.4.If the issue persists, please try to update your Visual Studio to the latest version(17.12.3) since new version has fixed some known problems.