History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-31951
Type: Bug Bug
Status: Investigating Investigating
Priority: Major Major
Assignee: Olga Lobacheva
Reporter: Shane Courtrille
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ReSharper

Cannot Resolve: Error type: NOT_RESOLVED when using namespace

Created: 15 Nov 06 23:36   Updated: 14 Dec 07 17:24
Component/s: PSI - Resolve
Fix Version/s: 3.1.1
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 304


 Description  « Hide
I have a class in a DLL that is referencing another class in another DLL. If I Import the namespace and use the name of the class I don't have any issues. If I use the namespace (for instance SharedLibrary.PersonEntity) I get the Cannot Resolve error.

 All   Comments   Work Log   Change History      Sort Order:
Shane Courtrille - 15 Nov 06 23:41
I should mention I get this in both VB.Net and C#

Olga Lobacheva - 16 Nov 06 12:58
Shane, does it reproduce well? I managed to get this effect but after restarting VS it gone.

Shane Courtrille - 16 Nov 06 19:01
Due to various crash issues with Resharper 2.5 I have to restart often and the problem is there every time.

Olga Lobacheva - 30 Nov 06 17:09
I can't reproduce it... ;( If you could help it would be nice...

Shane Courtrille - 30 Nov 06 18:22
The issue has become much less common but it still occurs. One of the big requirements seems to be opening a new solution when you are in VS 2005 and you already have a solution open. But that alone doesn't always cause it. We'll try and pay more attention to it today and see if we can get any additional clues.

Shane Courtrille - 30 Nov 06 19:11
Some new notes..

The project is part of a 7 project solution. Assuming I have the following massively snipped code:

Class MustInherit Discount (which exists in the Orders project)
Public Sub AttachParent(ByVal item as Orders.Item)
SharedLibrary.Check.ArgumentNotNull(item, "item")
End Sub
End Class

I get the resolve error on the Item part of Orders.Item in the parameters. I then closed the solution and just opened the Orders project. At this point the error on item goes away. I checked the other projects in the solution and none of them seem to have this self referential problem. And there isn't a problem with doing Orders.Item from a different project in the solution.

As a test I tried removing everyone else from the solution and the problem went away. The problem still existed so I thought there was probably a corrupt Resharper cache so I went and did the clear cache option. Nothing happened so I assume the cache is stored in memory.

Okay this is interesting.. I just Undid my checkout on the solution file to get back all the projects and when I reopened the solution the problem went away. Two interesting things that happened was I got the corrupt menu message from Resharper and it rebuilt itself. Then the cache rebuilt itself.

At this point I opened another solution which contained the same project. This time I got the same problem in the same class but not on the same location. In fact it was now complaining about Orders.Discount. Cleared the cache and closed/reopened the project. Cache rebuilds itself and everything is fine.

So with all that said and done it appears that the problem is actually cache corruption.


Shane Courtrille - 30 Nov 06 19:13
In my prior comment replace the following

As a test I tried removing everyone else from the solution and the problem went away. The problem still existed so I thought there was probably a corrupt Resharper cache so I went and did the clear cache option. Nothing happened so I assume the cache is stored in memory.

with

As a test I tried removing everyone else from the solution and the problem did not go away. I thought there could be a corrupt Resharper cache so I went and did the clear cache option. Nothing happened so I assume the cache is stored in memory.


Dmitry Lomov - 30 Nov 06 20:15
Shane,

what build you are on currently?

Friendly,
Dmitry


Olga Lobacheva - 30 Nov 06 20:25
Hm, could it be related to such point that ReSharper doesn't update its caches after changing default namespace property? I found this bug day or two ago and have fixed today. Or in C# this problem appears as well?

Shane Courtrille - 30 Nov 06 22:46
I am on version 312 and the problem project is written in VB.Net so I can't tell if it occurs in C#.

I think the problem we did have in C# was fixed by 312.

As a side note the problem has fixed itself before (when the cache was nuked) but it eventually comes back. Not sure what it is that's messing up things.