Reporter | Joe White (joewhite) |
---|---|
Created | Oct 22, 2012 6:29:28 PM |
Updated | Apr 18, 2018 6:53:24 AM |
Resolved | Mar 20, 2014 1:40:43 PM |
Subsystem | Solution Wide Error Analysis (SWEA) |
Assignee | Kirill Falk (kfalk) |
Priority | Show-stopper |
State | Fixed |
Type | Bug |
Fix version | 8.2 |
Affected versions | 7.1 EAP, 6.1, 6.1.1, 7.0, 7.0.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
Every now and then, after Visual Studio has reloaded a bunch of projects (e.g. after I've gotten latest code from version control), ReSharper will forget everything it knows about some of my types, and will report errors on any code that refers to members of those types. This is a long-standing problem; it's been around for several major versions, at least. It's not reproducible on demand, but it happens about once every week or two, under normal usage.
Clicking the "Reanalyze files with errors" toolbar button (in the "Errors in Solution" window) has no effect when it gets into this state.
It's in this state this morning. Here are a couple examples of the "problems" it's reporting:
If all the errors refer to a single type, sometimes I can fix them by navigating to the type it's forgotten about (and obviously I can't use ReSharper to navigate to it, unless I remember the filename and use Go To File) and make a trivial edit to the type. (I usually add a space in the middle of the class name, wait a couple seconds for it to realize that everything is non-compilable, then undo the change.) Then ReSharper re-parses the file, recognizes the type, and everything's fine... for that error. When ReSharper gets into this state, sometimes fixing an error will cause two more to appear.
Another fix is to close Visual Studio and reopen it. But that takes several minutes due to the size of our solution, so I prefer to avoid it when I can.
Please fix it so it stops getting into this bad state!
Clicking the "Reanalyze files with errors" toolbar button (in the "Errors in Solution" window) has no effect when it gets into this state.
It's in this state this morning. Here are a couple examples of the "problems" it's reporting:
- Class X declares a field of type Y. The field declaration (private Y _y;) is fine, and shows up with no errors. However, everyplace X refers to _y.Something, ReSharper shows the Something in red, and reports "Cannot resolve symbol 'Something'." So it knows class Y exists, but it doesn't think there's anything in it.
- Sometimes this even happens when class X and class Y are declared in the same file.
- It also regularly complains about static methods, constructors, etc. Basically anything that refers to members of a type that it's confused about.
- If I try to use Navigate To Type to go to type Y, ReSharper acts like there is no such type; it says "No types found in solution". (So it knows the type is valid for field declarations, but not for navigation. Huh?)
If all the errors refer to a single type, sometimes I can fix them by navigating to the type it's forgotten about (and obviously I can't use ReSharper to navigate to it, unless I remember the filename and use Go To File) and make a trivial edit to the type. (I usually add a space in the middle of the class name, wait a couple seconds for it to realize that everything is non-compilable, then undo the change.) Then ReSharper re-parses the file, recognizes the type, and everything's fine... for that error. When ReSharper gets into this state, sometimes fixing an error will cause two more to appear.
Another fix is to close Visual Studio and reopen it. But that takes several minutes due to the size of our solution, so I prefer to avoid it when I can.
Please fix it so it stops getting into this bad state!