23

In our VS2012 web project we are getting hundreds of errors reported by Resharper, but the software builds and compiles fine.

How do I get resharper to correctly identify the fact that the solution is actually fine.

All the errors are about properties on classes are not found.

I have tried cleaning the solution and forcing Resharper to re-analyze.

Ian Vink
  • 66,960
  • 104
  • 341
  • 555
  • Related: https://stackoverflow.com/questions/15713167/resharper-cannot-resolve-symbol-even-when-project-builds – Jeff B May 06 '19 at 22:53

4 Answers4

78

Go to Tools -> Options -> ReSharper -> Options -> General and click Clear Caches. Click Cancel and then in the ReSharper options window click Suspend Now and after that click Resume button.

This way you'll clear the corrupt cache and restart the ReSharper.

devuxer
  • 41,681
  • 47
  • 180
  • 292
Kimi
  • 13,621
  • 9
  • 55
  • 84
  • 4
    After trying several of the recommendations here and elsewhere, this is the one that worked for me. Thank you! – Shawn South Sep 03 '15 at 19:27
  • 1
    I also had to Unload/Reload the project after this. – MemphiZ Jun 27 '19 at 13:41
  • Just to clarify for anyone else reading this, the suspend/resume is in Visual Studio Options -> ReSharper -> General. Or just type "resharper general" into the quick search (ctrl+q). – laurencee Feb 25 '21 at 03:20
8

for me, the problem is fixed by right clicking on the project, 'Unload Project' and reload thereafter.

Denis Wang
  • 965
  • 12
  • 13
  • Wow, I didn't think this would work but it did! Thanks. For people that don't know, right click on your project in the solution explorer and select "unload project." After unloading the project, right click again and select "reload project." – rboarman Nov 16 '18 at 16:27
  • This worked for me too. Was not able to get errors to go away using cache/suspend/resume. Had multiple projects in my solution; unloaded projects until errors disappeared, then reloaded projects one by one, which fixed it for me. This time, at least. – Jerry Davis Sep 19 '19 at 15:12
3

Resharper gets confused for many reasons, but some of the times I had issues the solutions I did were:

  • like this case

  • disable Resharper for a set of files: Resharper => Options => Code Inspection =>Settings => Edit Items to Skip

  • sometimes is just a bug, make sure is not reported already. Look for example on this forum thread

Community
  • 1
  • 1
Ciprian Khlud
  • 434
  • 3
  • 6
0

For me, inspecting the solution gave me hundreds of errors, including many "cannot find file in search paths". I tried every suggestion out there to fix it and none of them worked. I ended up finding out inspecting the project, instead of the solution, worked perfectly.

Dakusan
  • 6,504
  • 5
  • 32
  • 45