ReSharper's solution-wide analysis enables two related but distinct features:
Solution-wide error analysis that detects if there are any compiler or runtime errors
in the whole solution on-the-fly and lets you view the list of errors using the
Errors in Solution window.
This brings two advantages:
- You do not have to open every file to make sure that your solution does not contain errors.
- ReSharper detects certain errors that it would not otherwise be able to detect within the local scope of a single file. For example, 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 switch on solution-wide analysis, and actually there are errors. You jump to the next error in solution and you find out that someone used this member from outside of the current assembly.
- Solution-wide code inspections are warnings or suggestions highlighted in code and on the marker bar in specific files (as opposed to the Errors in Solution tool window) when solution-wide analysis is on. They help detect unused non-private members, classes, and parameters, unassigned fields, suspicious type conversions etc.
Solution-wide analysis is disabled by default and should be explicitly configured for every new solution you open.
This section explains how to:
- Enable solution-wide analysis as a prerequisite to view all errors in solution or use solution-wide inspections.
- Configure solution-wide analysis to optimize its performance and visual presentation.
- View errors in solution.
- Configure how ReSharper displays errors in solution by ignoring specific errors.
- Make use of solution-wide inspections.