R# seems to frequently "forget" symbols for no reason.

So annoying. This tends to happen a lot, especially inside MVC view files.

Quite frequently will be working along in a solution with no errors, then after some minor refactoring, the solution-wide analysis will suddenly show dozens and dozens of errors. These are always "cannot resolve symbol" errors on symbols which clearly exist. Especially frustrating is seeing an occurrence of "cannot resolve symbol" when the EXACT SAME symbol is being correctly resolved only a couple of lines away.

No amount of cache clearing or restarting Visual Studio seems to help with this. Usually, the only way to deal with it is to trash the *Resharper* files/folders in the solution and start all over.

5 comments

Hello Lee,

Have you noticed any certain actions or refactoring that lead to this behavior?
It would be great if you could figure exact repro steps, so that we could
reproduce and fix this problem on our side. Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

So annoying. This tends to happen a lot, especially inside MVC view
files.

Quite frequently will be working along in a solution with no errors,
then after some minor refactoring, the solution-wide analysis will
suddenly show dozens and dozens of errors. These are always "cannot
resolve symbol" errors on symbols which clearly exist. Especially
frustrating is seeing an occurrence of "cannot resolve symbol" when
the EXACT SAME symbol is being correctly resolved only a couple of
lines away.

No amount of cache clearing or restarting Visual Studio seems to help
with this. Usually, the only way to deal with it is to trash the
Resharper files/folders in the solution and start all over.

---
Original message URL:
http://devnet.jetbrains.net/message/5302772#5302772



0

Andrew,

so that we could
reproduce


That's easy: Just don't test using small HelloWorld apps but use real-world
multi-project solutions (like Orchard).

Every (reported)
  "Assembly by mvid exists for"
or
  "The Assembly:XY lifetime has never been terminated."

exception will break something at the R# code DOM.

--
/\/\arkus.

0

Yup, same problem... Just need a big solution to reproduce this...

0

Producing an exact repro may prove to be very difficult. It doesn't happen all the time, and it doesn't happen with small or trivial solutions.

The behavior seems to occur most often after doing something like moving a file into a new namespace, or renaming a namespace, or some other refactoring that affects many files in one action. That's about as much as I can nail down right now.

0

I have been able to narrow this down further. It only seems to happen with views that are inside of Areas.

It's like it's looking for the symbol in the main area of the site, then just gives up. What's even weirder, I can fix this by deleting the symbol name in the view, then just retyping the exact same symbol in the exact same place. Then, it seems to "re-find" it again.

In fact, ReSharper seems to have a difficult time with Areas in general. For example, let's say I have this in web.config

<location path="Admin/WebmasterOnly">
    <system.web>
      <authorization>
        <allow roles="Webmaster"/>
        <deny users="*"/>        
      </authorization>
    </system.web>
  </location>


where Admin is a path inside of an Area (in other words, the actual path is /Areas/Admin/...)

In this case, the <location> element will be blurred out, as ReSharper claims /Admin/WebmasterOnly is not an existing path. Resharper will also continually prompt to use /Areas/Admin/WebmasterOnly, which of course you would not want to do, since the area portion of the URL does not appear in the path when you use areas.

0

Please sign in to leave a comment.