简体   繁体   中英

Solution Wide Analysis Broken in Resharper 4.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...

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.

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.

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.

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.

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 (ie, programming using non-Latin letters.)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM