Solution Wide Analysis Broken in Resharper 4.5?
Asked Answered
I

5

7

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...

Indefinable answered 12/5, 2009 at 20:18 Comment(4)
I've seen this occasionally in earlier versions too, the analysis would color a single file practically all red. Close/reopen of the file or solution wouldn't help, sometimes not even close/reopen of VS. I have a vague recollection that I may have wiped ReSharper's cache files in an attempt to fix the situation, but I really don't remember whether or not that worked.Acidulent
I've had similar problems, and the latest nightly build (4.5.1236.0) seems to fix itWeisburgh
Excellent. I had the 4.5.1234.4 build and didn't see an update yesterday. Thanks!Indefinable
The latest build didn't help... I'm still getting these issues today. :-/Indefinable
S
15

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.

Songster answered 13/5, 2009 at 9:21 Comment(3)
Hmm, I like that better than my solution, or disabling then re-enabling solution-wide analysis... Thanks!Indefinable
that "reanalyze files with errors" trick just saved my day. awesome tip. thank you.Veneaux
it did work also for my Rider which was showing old errors in solution wide Analyse paneVelasco
S
11

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.

Spivey answered 21/5, 2009 at 19:51 Comment(1)
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.Talent
S
1

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.

Serviceable answered 21/5, 2009 at 14:34 Comment(0)
I
0

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.

Itinerary answered 13/5, 2009 at 21:37 Comment(1)
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.Indefinable
P
0

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.

Pirouette answered 17/5, 2009 at 10:57 Comment(1)
hmm, that's interesting. I have found the version 4 and higher to be much more performant though...Indefinable

© 2022 - 2024 — McMap. All rights reserved.