ReSharper getting confused as to what file I am currently viewing

I have been having an extremely annoying issue with ReSharper 4 beginning
a few builds before the beta build. It continues to be a problem in the
Release Canadate build. The problem is this:

Sometimes when I open a file for editing via a Ctrl-N, or a Ctrl-Click (or
any other ReSharper specific way), ReSharper will seem to get confused as
to what file it is on. The correct file opens, but the side bar does not
match up with the file (e.g. the warnings/errors displayed are from a seemingly
random other file), and none of the ReSharper syntax highlighting shows up.
In addition, if I close the file, and do a Ctrl-E to see the recent files,
the file that I just closed does not appear, but instead that seemingly random
file appears at the top of the list instead. After closing the file, if
I open it up using the same method as before, the file opens just fine, the
gutter bar and syntax highlighting work again, and all is well. But this
seems to happen to me quite often (maybe 1 out of 5 times), and is quite
annoying. Is anyone else experiencing this? Note that I am working in a
fairly large solution with a fairly large website project (VS 2005). To
me, this seems like a pretty nasty bug that should be fixed before the release.
Any help would be appreciated.

~Andy


0
15 comments
Avatar
Permanently deleted user

Andy Alm wrote:

I have been having an extremely annoying issue with ReSharper 4
beginning a few builds before the beta build. It continues to be a
problem in the Release Canadate build. The problem is this:

Sometimes when I open a file for editing via a Ctrl-N, or a
Ctrl-Click (or any other ReSharper specific way), ReSharper will seem
to get confused as to what file it is on. The correct file opens,
but the side bar does not match up with the file (e.g. the
warnings/errors displayed are from a seemingly random other file),
and none of the ReSharper syntax highlighting shows up. In addition,
if I close the file, and do a Ctrl-E to see the recent files, the
file that I just closed does not appear, but instead that seemingly
random file appears at the top of the list instead. After closing
the file, if I open it up using the same method as before, the file
opens just fine, the gutter bar and syntax highlighting work again,
and all is well. But this seems to happen to me quite often (maybe 1
out of 5 times), and is quite annoying. Is anyone else experiencing
this? Note that I am working in a fairly large solution with a
fairly large website project (VS 2005). To me, this seems like a
pretty nasty bug that should be fixed before the release. Any help
would be appreciated.

~Andy


I've got same issue sometimes. Also have big solutions and with web
application projects.

--
by Peter Sulek at 4. 6. 2008 13:26:46
XanaNews 1.18.1.6

0
Avatar
Permanently deleted user

We are also see this in a large solution containing a Web site (not a Web
Application).

David

"Peter Sulek" <terrorix@centrum.sk> wrote in message
news:g25u6n$q41$1@is.intellij.net...

Andy Alm wrote:

>
>> I have been having an extremely annoying issue with ReSharper 4
>> beginning a few builds before the beta build. It continues to be a
>> problem in the Release Canadate build. The problem is this:
>>
>> Sometimes when I open a file for editing via a Ctrl-N, or a
>> Ctrl-Click (or any other ReSharper specific way), ReSharper will seem
>> to get confused as to what file it is on. The correct file opens,
>> but the side bar does not match up with the file (e.g. the
>> warnings/errors displayed are from a seemingly random other file),
>> and none of the ReSharper syntax highlighting shows up. In addition,
>> if I close the file, and do a Ctrl-E to see the recent files, the
>> file that I just closed does not appear, but instead that seemingly
>> random file appears at the top of the list instead. After closing
>> the file, if I open it up using the same method as before, the file
>> opens just fine, the gutter bar and syntax highlighting work again,
>> and all is well. But this seems to happen to me quite often (maybe 1
>> out of 5 times), and is quite annoying. Is anyone else experiencing
>> this? Note that I am working in a fairly large solution with a
>> fairly large website project (VS 2005). To me, this seems like a
>> pretty nasty bug that should be fixed before the release. Any help
>> would be appreciated.
>>
>> ~Andy
>

I've got same issue sometimes. Also have big solutions and with web
application projects.

>

--
by Peter Sulek at 4. 6. 2008 13:26:46
XanaNews 1.18.1.6



0
Avatar
Permanently deleted user

Andy,

Frankly speaking, I've no idea how this could happen.... But here are a
couple of questions answers to which may give us a clue.

1. If the error stripe is incorrect, what happens when you click on its
marks?
2. Does it happen after files being renamed or moved?
3. Was the desired file open before the action?
4. Was the wrong file open before the action?
5. Is the effect persistent to some extent? I.e. is the wrong file always
the same when opening the same desired file?
6. Do desired and wrong files have any similarity (i.e. have the same name
or located in the same folder?)
7. Isn't it the case when you have the same file linked into several
projects? In the case, the highlighting and errors will depend on what
project is the open file from. For instance, you may link the same .cs file
into 2 projects with different module references. In the case if you open
the file from solution explorer it will be highlighted according to the
project corresponding to the parent node in the solution explorer. Then if
you close the file and open it from another node in the solution explorer it
will look differently. Note, if you don't close the file before opening it
from different location VS may refuse to open it (stating it's already open)
or might try to open it somehow.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Avatar
Permanently deleted user

Exactly the same issue here with 815.

I'm also experiencing this on a large web project in VS2005

0
Avatar
Permanently deleted user

Hello Sergey,

I cannot answer some of your questions with definite answers, as I have not
studied the scenarios in enough detail yet. I will keep an eye out and try
to get better answers. However, I have attempted to answer them to the best
of my abilities below:

See my answers inline:

Andy,

Frankly speaking, I've no idea how this could happen.... But here are
a couple of questions answers to which may give us a clue.

1. If the error stripe is incorrect, what happens when you click on
its
marks?


I don't remember there ever being any error stripes. Sometimes the box at
the top is red, and sometimes its green, but I don't believe there have ever
been error stripes. I will pay more attention and if I see one, I will try
to click it to see what happens.

2. Does it happen after files being renamed or moved?


Not necessarily. This can happen soon after I have opened up the solution,
before renaming or moving any files.

3. Was the desired file open before the action?


I know this has happened for files that were not open. Not sure if it has
happened for files that were.

4. Was the wrong file open before the action?


No

5. Is the effect persistent to some extent? I.e. is the wrong file
always
the same when opening the same desired file?


It seems the last several times this has happened, the AssemblyInfo.cs file
from one of my .csproj files was the one that showed up when I did a Ctrl-E.

6. Do desired and wrong files have any similarity (i.e. have the same
name
or located in the same folder?)


No, the names do not seem to have any relation necessarily.

7. Isn't it the case when you have the same file linked into several
projects? In the case, the highlighting and errors will depend on what
project is the open file from. For instance, you may link the same .cs
file
into 2 projects with different module references. In the case if you
open
the file from solution explorer it will be highlighted according to
the
project corresponding to the parent node in the solution explorer.
Then if
you close the file and open it from another node in the solution
explorer it
will look differently. Note, if you don't close the file before
opening it
from different location VS may refuse to open it (stating it's already
open)
or might try to open it somehow.


I do not have any files that belong to more than one project. We are not
currently using links.


0
Avatar
Permanently deleted user

I just repro'd it on a very small web application project. It was referencing
a couple rather large .csproj projects, but the web project was very small.
I had recently created a new .aspx file, and then did a Ctrl-N to go to
an existing type in one of the .csproj files. This time, when I did a Ctrl-E,
it seemed to think that I was currently on a .designer.cs file (of the recently
created file), but in fact I was on the file that I had done a Ctrl-N for.....but
syntax highlighting was not present.

Hello Sergey,

I cannot answer some of your questions with definite answers, as I
have not studied the scenarios in enough detail yet. I will keep an
eye out and try to get better answers. However, I have attempted to
answer them to the best of my abilities below:

See my answers inline:

>> Andy,
>>
>> Frankly speaking, I've no idea how this could happen.... But here are
>> a couple of questions answers to which may give us a clue.
>>
>> 1. If the error stripe is incorrect, what happens when you click on
>> its
>> marks?

I don't remember there ever being any error stripes. Sometimes the
box at the top is red, and sometimes its green, but I don't believe
there have ever been error stripes. I will pay more attention and if
I see one, I will try to click it to see what happens.

>> 2. Does it happen after files being renamed or moved?
>>

Not necessarily. This can happen soon after I have opened up the
solution, before renaming or moving any files.

>> 3. Was the desired file open before the action?
>>

I know this has happened for files that were not open. Not sure if it
has happened for files that were.

>> 4. Was the wrong file open before the action?
>>

No

>> 5. Is the effect persistent to some extent? I.e. is the wrong file
>> always
>> the same when opening the same desired file?

It seems the last several times this has happened, the AssemblyInfo.cs
file from one of my .csproj files was the one that showed up when I
did a Ctrl-E.

>> 6. Do desired and wrong files have any similarity (i.e. have the same
>> name
>> or located in the same folder?)

No, the names do not seem to have any relation necessarily.

>> 7. Isn't it the case when you have the same file linked into several
>> projects? In the case, the highlighting and errors will depend on
>> what
>> project is the open file from. For instance, you may link the same
>> .cs
>> file
>> into 2 projects with different module references. In the case if you
>> open
>> the file from solution explorer it will be highlighted according to
>> the
>> project corresponding to the parent node in the solution explorer.
>> Then if
>> you close the file and open it from another node in the solution
>> explorer it
>> will look differently. Note, if you don't close the file before
>> opening it
>> from different location VS may refuse to open it (stating it's
>> already
>> open)
>> or might try to open it somehow.

I do not have any files that belong to more than one project. We are
not currently using links.



0
Avatar
Permanently deleted user

Andy,
I tried to repro - no chance :(
We'll do our best to catch and fix the problem.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Andy Alm" <andyalm@hotmail.com> wrote in message
news:e91e0d4d16db8ca9454013c9878@news.jetbrains.com...
>I just repro'd it on a very small web application project. It was
>referencing a couple rather large .csproj projects, but the web project was
>very small. I had recently created a new .aspx file, and then did a Ctrl-N
>to go to an existing type in one of the .csproj files. This time, when I
>did a Ctrl-E, it seemed to think that I was currently on a .designer.cs
>file (of the recently created file), but in fact I was on the file that I
>had done a Ctrl-N for.....but syntax highlighting was not present.
>
>> Hello Sergey,
>>
>> I cannot answer some of your questions with definite answers, as I
>> have not studied the scenarios in enough detail yet. I will keep an
>> eye out and try to get better answers. However, I have attempted to
>> answer them to the best of my abilities below:
>>
>> See my answers inline:
>>
>>> Andy,
>>>
>>> Frankly speaking, I've no idea how this could happen.... But here are
>>> a couple of questions answers to which may give us a clue.
>>>
>>> 1. If the error stripe is incorrect, what happens when you click on
>>> its
>>> marks?
>> I don't remember there ever being any error stripes. Sometimes the
>> box at the top is red, and sometimes its green, but I don't believe
>> there have ever been error stripes. I will pay more attention and if
>> I see one, I will try to click it to see what happens.
>>
>>> 2. Does it happen after files being renamed or moved?
>>>
>> Not necessarily. This can happen soon after I have opened up the
>> solution, before renaming or moving any files.
>>
>>> 3. Was the desired file open before the action?
>>>
>> I know this has happened for files that were not open. Not sure if it
>> has happened for files that were.
>>
>>> 4. Was the wrong file open before the action?
>>>
>> No
>>
>>> 5. Is the effect persistent to some extent? I.e. is the wrong file
>>> always
>>> the same when opening the same desired file?
>> It seems the last several times this has happened, the AssemblyInfo.cs
>> file from one of my .csproj files was the one that showed up when I
>> did a Ctrl-E.
>>
>>> 6. Do desired and wrong files have any similarity (i.e. have the same
>>> name
>>> or located in the same folder?)
>> No, the names do not seem to have any relation necessarily.
>>
>>> 7. Isn't it the case when you have the same file linked into several
>>> projects? In the case, the highlighting and errors will depend on
>>> what
>>> project is the open file from. For instance, you may link the same
>>> .cs
>>> file
>>> into 2 projects with different module references. In the case if you
>>> open
>>> the file from solution explorer it will be highlighted according to
>>> the
>>> project corresponding to the parent node in the solution explorer.
>>> Then if
>>> you close the file and open it from another node in the solution
>>> explorer it
>>> will look differently. Note, if you don't close the file before
>>> opening it
>>> from different location VS may refuse to open it (stating it's
>>> already
>>> open)
>>> or might try to open it somehow.
>> I do not have any files that belong to more than one project. We are
>> not currently using links.
>>
>



0
Avatar
Permanently deleted user

Maybe ReSharper needs to do more logging :)

Seriously, folks who complain about the size of the log files: this is why it is better to have extensive logging enabled in "production" -- some problems are very difficult to reproduce in a different environment, and it is not always obvious what steps it takes to encounter a particular problem. With disk space so inexpensive, it is almost always more cost-effective to have exensive logs that accurately indicate what happened than to try and reproduce/recreate some scenario later.

0
Avatar
Permanently deleted user

Hello Sergey,

I appreciate you looking into it. I will continue to see if I can naildown
a more consistent repro. This is a light coding week for me so its harder
for me to do that currently. I should be coding more next week however,
and can hopefully make some progress.

Anyone else who is experiencing this issue: we can definitely use your help
as well!

~Andy

Andy,
I tried to repro - no chance :(
We'll do our best to catch and fix the problem.



0
Avatar
Permanently deleted user

Andy,

what VS are you using? It looks like we managed to reproduce the problem
with VS2005.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Avatar
Permanently deleted user

Well he did mention the following in his first post:

Note that I am working in a
fairly large solution with a fairly large website project (VS 2005)

:)

Gabriel Lozano-Moran

"Sergey V. Coox (JetBrains)" <qx@intellij.com> wrote in message
news:g2b729$84b$1@is.intellij.net...

Andy,

>

what VS are you using? It looks like we managed to reproduce the problem
with VS2005.

>

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"



0
Avatar
Permanently deleted user

Thanks, Gabriel. I just skimmed thru the original post missing substantial
details.
Anyway, it looks like I've fixed the problem, so the upcoming build will
contain the fix.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Avatar
Permanently deleted user

I can give some information from my testing as well.


"Sergey V. Coox (JetBrains)" <qx@intellij.com> wrote in message
news:g2687t$ooc$1@is.intellij.net...

Andy,

>

Frankly speaking, I've no idea how this could happen.... But here are a
couple of questions answers to which may give us a clue.

>

1. If the error stripe is incorrect, what happens when you click on its
marks?


You get moved to a line (almost always one of the using statements at the
top in my case) that is clearly not in error.

2. Does it happen after files being renamed or moved?


I find that it happens most often when opening a file for the first time in
the current VS session. Closing and reopening the file fixes the problem.

3. Was the desired file open before the action?


No, but it could have been opened/closed before in the session. Closing and
reopening fixes.

4. Was the wrong file open before the action?


I will have to check on this, as I tend to just fix and move on.

5. Is the effect persistent to some extent? I.e. is the wrong file always
the same when opening the same desired file?


I will have to check on this, as I tend to just fix and move on.

6. Do desired and wrong files have any similarity (i.e. have the same name
or located in the same folder?)


I will have to check on this, as I tend to just fix and move on.

7. Isn't it the case when you have the same file linked into several
projects? In the case, the highlighting and errors will depend on what
project is the open file from. For instance, you may link the same .cs
file into 2 projects with different module references. In the case if you
open the file from solution explorer it will be highlighted according to
the project corresponding to the parent node in the solution explorer.
Then if you close the file and open it from another node in the solution
explorer it will look differently. Note, if you don't close the file
before opening it from different location VS may refuse to open it
(stating it's already open) or might try to open it somehow.


Disallowed by our TFS settings.

>

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"



0
Avatar
Permanently deleted user

Hello Sergey,

That is great news! Thanks so much for being so responsive. I'll try the
next build when it comes out.

~Andy

Thanks, Gabriel. I just skimmed thru the original post missing
substantial
details.
Anyway, it looks like I've fixed the problem, so the upcoming build
will
contain the fix.



0
Avatar
Permanently deleted user

David,

Thanks for your feedback. The symptoms are very similar to those being fixed
in build 818. Try it, please.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Please sign in to leave a comment.