ReSharper 2024.2 Help

Configure project-specific properties

The main set of ReSharper preferences (configured in the ReSharper | Options dialog) apply either globally or per solution. There are also some preferences that can be configured for each project or folder separately. These preferences are available in the Project Item Properties popup, which you can invoke by selecting Edit project item properties from the context menu of the project in the Solution Explorer.

ReSharper: Project item properties

Similarly to other ReSharper settings, project-specific properties can be saved in two files: [ProjectName].csproj.DotSettings (intended for common preferences, like C# version) and [ProjectName].csproj.DotSettings.user (intended for personal preferences, like local path mapping). If necessary, you can share the common preferences with your team by putting the [ProjectName].csproj.DotSettings file under source control.

When you edit project-specific settings from the UI, they are saved in the [ProjectName].csproj.DotSettings file.

Namespace provider

Only available on folders.

By default, ReSharper assumes that the namespace each class appears in matches its location in the project. The 'root' namespace for the project is defined in the project properties:

ReSharper code inspection: Namespace does not correspond to file location

As a result of the above, all code elements at the project level are expected to appear in the ShareX namespace, and a warning will be issued otherwise.

Namespaces are made deeper with the introduction of folders. In the example below, a folder called StartupManagers will necessitate all items it contains to appear in the ShareX.StartupManagers namespace. However, there are cases where you do not need the folder to append an extra namespace element. In such cases, you can set Namespace Provider to False.

ReSharper: 'Namespace provider' property of a project folder

A folder which is not a Namespace Provider will not influence the namespace of elements it contains, and ReSharper will analyze and refactor the related code accordingly.

Additional assembly references

If your project references some assemblies in a custom way, ReSharper may not be able to find them and therefore cannot correctly analyze this project.

Use this semicolon-separated list to let ReSharper know where those assemblies are located, so that it could correctly resolve symbols from those assemblies.

Additional compile items

If your project includes files in a custom way, ReSharper may not be able to find them and therefore cannot correctly analyze this project.

Use this semicolon-separated list to let ReSharper know where those files are located, so that it could correctly resolve them.

C#/VB Language Level

Use this selector to choose the language version. The Default value means that ReSharper automatically detects the language version based on the project settings. Depending on the selected language version, ReSharper's code inspection detects code issues and suggests improvements relevant to the selected version. For more information, refer to C# language versioning on Microsoft Docs.

ConfigureAwait analysis mode

Use this option to analyze ConfigureAwait() calls in projects that use the asynchronous programming model (async/await keywords).

  • Library mode — ReSharper will suggest adding ConfigureAwait(false) calls to awaitables.

  • UI mode — ReSharper will report ConfigureAwait(true) calls as redundant.

For more information, refer to ConfigureAwait analysis.

Force call MsBuild

Use this option to retrieve module references via MsBuild. For example, this may be helpful if there are COM API references and the project is opened in an older Visual Studio version, without Roslyn support.

Custom pageParseFilterType handling

This property is only available for web projects.

Use this selector to choose how ReSharper should treat unrecognized values of the pageParseFilterType attribute of the pages element in Web.config.

Localizable

This preference defines whether to perform localization inspection. If the Default value is selected, the inspection is only performed if there is at least one resource file in the project. The Yes and No values allow enabling/disabling this inspection explicitly.

Localizable inspector

The Localizable Inspector project property defines how to treat string literals that are not consumed by any member marked with LocalizableAttributeOptimistic algorithm will ignore such strings, Pessimistic will flag them as localizable.

Read project model from project file

For most of its features (including navigation, code analysis, refactorings, and code completion) , ReSharper builds and maintains a model of the current solution. The model is cached and then used to instantly access any item in the solution structure.

By default, ReSharper reads project and solution files independently of Visual Studio. This method is preferred because:

  • it does not use Visual Studio COM API and therefore does not block the UI thread,

  • it renders a more reliable model for projects targeting multiple frameworks.

However, it has some minor side effects:

  • ReSharper needs projects and solution files to be up to date. Therefore, in case the files were edited but not saved, it will save them automatically.

  • Theoretically, there could be extremely rare coincidences when you can have a Cannot access file error during the build because ReSharper has temporarily locked a project file. In this case, you can just start the build once again.

If some of the above is a problem, set this option to False to make ReSharper read project structure via Visual Studio COM API, which can be a little bit slower.

Alternatively, you can configure this behavior for all projects in the solution using the Read solution model directly from project/solution files checkbox on the Environment | General page of ReSharper options Alt+R, O.

Path mapping

This property is only available for web projects.

Using this preference, you can synchronize locations of files during the design of the app with the locations where the app gets deployed. For more information, refer to Path mapping.

Solution-Wide Inspections

This preference defines whether the Solution-wide code inspections should be enabled in the project. The On and Off values allow enabling/disabling this inspection explicitly. The Internal symbols only value partly enables this inspection for types and type members with the internal access.

Use Roslyn to obtain project references

Starting from Visual Studio 2015, ReSharper retrieves project references via Roslyn. If some references are not resolved correctly, you can disable this option so that the references are retrieved via COM API.

Last modified: 11 February 2024