ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Solution-wide analysis

Last modified: 23 September 2024

Solution-wide analysis finds errors in all supported languages except C++, including ones that do not prevent your project from compiling. If your project includes such files (for example, JavaScript, CSS, HTML), solution-wide analysis will help you find errors that could be otherwise only detected in runtime.

ReSharper's solution-wide analysis enables two related but distinct features:

  • Solution-wide errors/warnings monitor, which lets you constantly keep track of all errors/warnings in your solution: both compiler errors/warnings and errors/warnings detected by ReSharper’s own inspections. This feature works together with the design-time code inspection and brings two advantages:

    • You do not have to open every file to make sure that your solution does not contain errors/warnings.

    • If you delete a public member or change its visibility, the code in the current file can still be correct, but what if this member is used somewhere else in the solution? For example, suppose that you changed the visibility of a member from public to internal, assuming that it was only used inside the current project. At this stage, ReSharper finds no errors in the current file. Then, you switch on solution-wide analysis, and actually there are errors. You can jump to the next error in solution and find out that someone uses this member from another project in your solution.

    note

    You can choose to monitor only errors or both errors and warnings in solution-wide analysis.

  • Solution-wide code inspections, which help find issues that can only be detected by analysing the whole solution (unused public types and members, unassigned public fields, suspicious type conversions and so on). When solution-wide analysis is enabled, issues detected by the solution-wide inspections are highlighted in the opened files in the same way as other issues, and they also appear in the Inspection Results window when you run code inspection in specific scope.

This feature is supported in the following languages and technologies:

The instructions and examples given here address the use of the feature in C#. For more information about other languages, refer to corresponding topics in the Languages and frameworks section.