8

I set up .editorconfig preferences for naming, and I want to see them for all files in our solution, but Visual Studio (2019 16.4.5) only shows the warnings / errors (as defined) If I have the file open in the editor, not for all occurrences in all files, like I want.

How can I see all occurrences of naming rule violations across all files in the solution?

1
  • Could you find a solution to this? I still have this problem with multiple solutions on multiple dev machines... But according to the internet it is only not working on my machine... Commented Jan 10, 2024 at 12:34

3 Answers 3

5

In Solution Explorer, right click on your Solution or Project and choose "Analyze and Code Cleanup", then "Run Code Analysis on Solution/Project". This will run the analyzer and show you all the errors/warnings in the whole solution or project.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

4

In Visual Studio go to

Options -> Text Editor -> C# -> Advanced

and check

  • Enable full solution analysis
  • Use .editorconfig compatibility mode

Then restart VS and rebuild solution

2 Comments

I did this, and I'm still seeing errors / warning pop up after I fix all the occurrences shown in the Error List. It's like it just randomly finds and shows them. So weird. But I assume this should be the accepted answer. I'll investigate some more. This is definitely related to me opening files in the editor, then some new errors pop up. But ironically I'm opening the file because another warning / suggestion is shown for it!
For anyone else finding this, these setting have been removed in Visual Studio version 16.8 and are no longer needed.
2

In the errors list tool window the top right drop down allows you to select "Current Document" which will filter the list to just the file with focus:

enter image description here

verses:

enter image description here

(Note the errors, warnings, and messages counts still show there are other places with issues.)

Also the extension Solution Error Visualizer may be helpful.

1 Comment

I think this is the opposite of what was asked about. Gakera wanted a way to see the errors for the whole solution and NOT just the current document. Reversing your advice also will not help because even when Entire Solution is selected it still won't search the whole solution for errors, it will just stop filtering the errors it already found.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.