ReSharper not properly initialized when using analyzerconfig?
Hi,
we've moved away from a central DotSettings to a shared configuration using analyzerconfig.
This analyzerconfig is share via NuGet Packages.
Some of our developers report a strange issue:
ReSharper does not highlight issues in the code properly.
In the File Formatting info, the following reference to an analyzerconfig is shown:

It shows, that the options are set correctly as well:

Nevertheless, the editor does not show that the code must is not correctly formatted:

The strange behavior only occurs on some machines.
Versions used:
VS 2022, 17.10.1, Resharper 2024.1
On all machines, where it occurs.
On my machine, I cannot reproduce the issue. The only difference is, that I don't have ReSharper C++ installed.
Does anybody have similar issues?
Regards
Carsten
Please sign in to leave a comment.
Hello Carsten,
Could you please share your analyzerconfig file or the corresponding NuGet package using our upload service - https://uploads.jetbrains.com/ so we could reproduce the problem on our side?
Thank you.
Hi,
I have uploaded the NuGet Package to 2024_06_14_2ECJBx7G6Pq1vgDm2xUeEx
The analyzerconfig was created from a dotsettings file using ReSharper.
The package is referenced by a Directory.packages.props:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="CentralPackageManagement">
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<PropertyGroup Label="LockBehavior">
<RestorePackagesWithLockFile>false</RestorePackagesWithLockFile>
</PropertyGroup>
<ItemGroup Label="CodingRules">
<GlobalPackageReference Include="ds.Internal.Arc.GlobalReSharperSettings" Version="2.0.0" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" PrivateAssets="all" />
</ItemGroup>
</Project>
Regards
Carsten
Hello,
thank you for the provided info.
Generally, the specified options are applied during code cleanup. To show them as errors/warnings you should add a corresponding severity to
# ReSharper inspection severities
section. E.g. forresharper_braces_for_for
it'sresharper_enforce_for_statement_braces_highlighting = warning
.Most probably the developers that don't experience this problem have also corresponding ReSharper settings.
I'd suggest to go through ReSharper settings in UI and set expected severity for all of them so they are highlighted as errors or warnings, e.g.:
Dear Angelina,
we've tested this out by adding
resharper_arrange_missing_parentheses_highlighting = suggestion
and also in another run by adding
resharper_arrange_missing_parentheses_highlighting = error
to the analyzerconfig.
Both settings did not apply to the desired behavior, that VS should mark these parts as faulty.
Any other idea, how we might get the reason of the issue? A debug log or something?
Regards
Carsten
Dear Angelina,
I did not receive any further information from you.
Is there anything that we can do? Or provide you more information?
Regards
Carsten