Over a million developers have joined DZone.

Solution-Wide Analysis Explained


ReSharper 3.1 - the productivity add-in to Microsoft Visual Studio - provides a new full-fledged feature called Solution-Wide Analysis, which looks for erroneous C# code in your solution on-the-fly, without compiling it first.

Suppose that you changed the visibility of a member from public to internal, assuming that it was only used inside the current assembly. At this stage, ReSharper finds no errors in the current file. Then, you turn on Solution-Wide Analysis and the circle indicator in the status bar turns red. You jump to the next error in solution and you find out that someone used this member from outside of the current assembly. You make necessary amendments, and that’s all! No need to compile, then look for errors, then fix them, and finally repeat the whole process over and over again.

Initial analysis may take some time to complete while you continue your work, but after it is done, only files that can potentially be affected by recent changes are reanalyzed.

Note that this feature is disabled by default and should be explicitly configured for every new solution you use.

To switch Solution-Wide Analysis on, just double-click the gray circle in the right corner of the status bar. After that, when the Solution-Wide Analysis tab displays in the Options dialog box, select Analyze errors in whole solution.











When Solution-Wide Analysis is enabled, the following changes occur in the UI:

  • The circle indicator in the right corner of the status bar displays the progress of Solution-Wide Analysis. Initially, it is gray, but after analysis is complete, the indicator turns either green (if no solution-wide errors were found) or red (if errors were detected).
  • A small area to the left of the circle indicator is allocated to show the number of solution files that contain errors, if any.
  • Names of several Go to commands are extended. Specifically, Go to Next Error changes to Go to Next Error in Solution and Go to Previous Error becomes Go to Previous Error in Solution.

To view the list of errors found in solution, double-click the circle indicator. The Errors in Solution window opens where you can view the list of detected errors and navigate to them in code by double-clicking their respective descriptions.







Even without opening that window, you can still easily navigate through errors in your solution with Go to Next Error in Solution (Alt+Shift+Page Down or Alt+F12) and Go to Previous Error in Solution (Alt+Shift+Page Up or Shift+Alt+F12) commands.



The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}