Reputation: 40759
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...
Upvotes: 7
Views: 2979
Reputation: 11544
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.
Upvotes: 11
Reputation: 20757
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.
Upvotes: 1
Reputation: 23789
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.
Upvotes: 0
Reputation: 818
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.
Upvotes: 15
Reputation: 21615
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.
Upvotes: 0