views:

701

answers:

5

I'm having trouble with solution wide analysis since I upgraded to resharper 4.5.

I'm continually getting false negatives, and having resharper report errors with my code that are not there.

I find the only way to get rid of the errors is to open each of the reported in error files, find the offending types/classes, open those files and then close everything again, which seems to force resharper to re-analyze everything.

I believe there is a defect already @ jira, but I'm looking for handy tips on how to quickly force resharper to re-analyze the files in error...

+4  A: 

When this happens to me I use shift+alt+Page-Down for scrolling to next error in solution. Just spaming through the errors will make Resharper re-analyze the files. Not a good solution, but it works.

Edit: If you go to the menu ReSharper -> Windows -> "Errors in Solution" you will get a window up called "Errors in Solution". There you have a button to the right called "Reanalyze Files With Errors". You can even put it on a shortcut.

Nasit
Hmm, I like that better than my solution, or disabling then re-enabling solution-wide analysis...Thanks!
John Weldon
A: 

Looks like an issue in resharper then. It's usually better to report it directly at them, then waiting for them to find out about this question.

Also, it's more a bug report than a programming question.

Sander Rijken
Yes I did mention that there was already a bug report, and that I was only looking for workarounds that anyone else had found. Thanks anyway.
John Weldon
Sorry I missed that
Sander Rijken
A: 

Same here, but then again I've been getting false positives (or negatives) for ages. The two fail points for me were WPF (XAML, specifically) and using Unicode in code files (i.e., programming using non-Latin letters.)

I would suggest simply switching it off, especially considering the performance price you pay for it.

Dmitri Nesteruk
hmm, that's interesting. I have found the version 4 and higher to be much more performant though...
John Weldon
+1  A: 

Depending how large your solution is, this may be a huge pain, but I have the same problem occasionally, and if I build the project showing the errors, it goes away.

For example, just yesterday, it couldn't find an Excel library for one of our smaller projects, and it was entirely red, even though nothing had changed, all DLLs were found and referenced, and nothing was evidently wrong. I just rebuilt that individual project, it compiled with no errors, and the red bars went away immediately.

Chris Doggett
+5  A: 

Delete your resharper cache files regularly - especially if you've upgraded from a previous version. You'll most likely have an Resharper. file somewhere under your solution folder. This entire folder structure can be blown away and, when Resharper misbehaves for me, I do this.

Martin Peck
Thanks for this. After going through and deleting all the Resharper folders and files throughout the solution and its constituent projects, solution-wide analysis is working.
Jay