ReSharper 2024.3 Help

Ignored Code

ReSharper options: Code Inspection | Ignored Code

In this page of ReSharper options, you can specify what to exclude from code inspection.

You can use Ant-style wildcards in file masks:

  • ? to match a single character excluding directory separators

  • * to match zero or more characters excluding directory separators

  • ** to match any number of characters including directory separators

  • / or \ to match directory separators regardless of the OS path format

For example a pattern **Test?\**.* will match the following files:

  • C:\Projects\MyTestX\data\file_one.txt

  • /home/projects/TestY/file_two.xml

But not:

  • C:\Projects\Test\data\file_one.txt

  • /home/projects/TestY/file_two

Projects to ignore

The ignored projects will not be indexed by ReSharper, meaning that no ReSharper features — for example, code analysis, refactorings, code generation — will be available in those projects.

This list is mainly intended to improve performance by not indexing and not analyzing projects that contain third-party code or frozen code, which is not going to be changed.

Although the source files in the ignored projects are not parsed, ReSharper will still process the compiled code from the output of those projects (which is very cheap performance-wise). This means that after you build the ignored projects, ReSharper will correctly resolve usages of symbols from those projects and you will be able to enjoy navigate and search in those projects.

So if after adding some projects to the ignore list, you have errors like 'Cannot resolve symbol', you need to build the ignored projects and ReSharper will be able to resolve those symbols from the compiled artifacts.

To add projects to the ignore list, either use project file names — for example ProjectOne.csproj, or file masks — for example Project*.csproj to match ProjectOne.csproj, ProjectTwo.csproj, and so on.

Note that the projects listed here will not be ignored when you run code inspection from the command line.

Elements to skip

ReSharper allows you to configure the list of files, file masks, and folders that should be excluded from code inspection. The excluded items are ignored by both design-time code inspection and code inspection in specific scope, but they are still indexed by ReSharper, so that you can navigate to or refactor symbols excluded from code inspection.

Last modified: 11 February 2024