This project is read-only.

Solution Level Diagnostic

Topics: APIs, C# Language Design, General
Jul 2, 2014 at 4:48 PM
I see Roslyn's diagnostic template mostly an editor-level tool. That is, only when you open a particular source file, Roslyn extension diagnoses that file for you.

I am wondering if it is possible to do some solution level diagnostic, e.g. you get a list of warnings for a entire solution.

This would be really helpful if you are digging in a huge source project. It would be a nightmare if you open files one by one to look for warnings.
Jul 2, 2014 at 9:32 PM
Edited Jul 2, 2014 at 9:41 PM
Yes, we want to show diagnostics for the entire solution. We've added an option to show the diagnostics for closed files (across the entire solution) in an upcoming CTP. Before we make that the default behavior though, we have some performance, memory consumption and user-experiences issues for large solutions to sort out and we are working through those. You should be able to turn it on for small to medium sized solutions without much inconvenience currently.

The option can be found here:


Basic->VB Specific has “Show diagnostics for closed files”
C# -> advanced has “Editor Help -> Show diagnostics for closed files”

You will have to reload your solution after changing the option for it to take effect.
Jul 2, 2014 at 10:33 PM
That is exactly what I am looking for!

However, I am not able to see this option in my IDE.

VS2013 Update 2
Latest Roslyn CTP runtime
Own Diagnostic Extension enabled

Am I missing anything?

Jul 3, 2014 at 12:42 AM
Sorry I wasn't clear. This is a change that will only be in an upcoming VS "14" CTP and not in the Roslyn preview for VS 2013. Our latest changes are part of the VS "14" CTPs.
Jul 3, 2014 at 3:46 PM
Jul 5, 2014 at 9:47 PM
Can you please explain, how those 'solution-wide' diagnostics will be invalidated?
Are you gonna run diagnostics over the solution on every user typing?
Jul 7, 2014 at 3:31 AM
We kick off analysis after a delay. Once the user pauses a little after typing, we start analyzing the solution in a certain order - current document, open documents, their projects etc.
Jul 7, 2014 at 10:02 AM
Do you think this approach is scalable enough to be part of Roslyn experience?
What if I have ~100k source code files (we really do) in solution?
Parse, build semantic information, run all the analyzers, for each of 100 000 files, re-running everything on every used edit? Seriously?