Problem
While working with a C++ project, ReSharper seems to not be able to index files properly. Trying to invoke the Rename refactoring on a symbol renames only the part of occurrences. It happens files after invoking the refactoring don't get the symbol renamed, so that the project breaks.
Another symptom that is explained by the same issue: Invoking the "Find Usages" on a class member shows "Usages of 'symbol' were not found", while the usages for sure exist.
Explanation
The known scenario when such an issue occurs is when the C++ files in .vcxproj file are included as <None Include="Path/To/File" /> instead of <ClCompile Include="Path/To/File" />.
By default, ReSharper reads compilation properties from the Visual Studio API. In this mode, VS API doesn't return any compilation properties for items included via <None Include="Path/To/File" />. So that ReSharper doesn't index such files.
Resolution
The workaround is to disable the "Read C++ compilation properties from Visual Studio API" setting in ReSharper | Options | Code Editing | C/C++ | General:
This way ReSharper will fall back using MSBuild project properties for the containing project.
Comments
0 comments
Please sign in to leave a comment.