Resharper losing references when switching between Debug/Release builds

I have a very consistent and repeatable problem with Resharper losing
references and flagging all sorts of good code with red lines, when
switching between Debug and Release builds, and doing a build.

However, this only happens reliably in one project, and in one instance:

I have a WinForms project, and the file that the main form class is in, has
an additional class defined at the bottom. This additional class is
referred to throughout the Winform class.

When I build, then switch from Debug to Release and build again, it loses
all the references to the second class at the bottom of the file and
everything goes red.

It's not 100% repeatable, but it's in the 90% range. It doesn't always
happen, but it happens most of the time. The sequence of events to get it
to happen is "Build solution... switch from Debug to Release... Build
solution".

Sometimes, the red goes away when I switch to another application and then
switch back. Most of the time I close the solution and re-open it.

Even with all the red, the solution continues to build without error. All
the errors are related to references to the second class being unknown or
unresolved.

Has anyone else experienced anything like this?


11 comments
Comment actions Permalink

"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:er58cq$2bd$1@is.intellij.net...
>I have a very consistent and repeatable problem with Resharper losing
>references and flagging all sorts of good code with red lines, when
>switching between Debug and Release builds, and doing a build.
>
...

When I build, then switch from Debug to Release and build again, it loses
all the references to the second class at the bottom of the file and
everything goes red.

>
....

Even with all the red, the solution continues to build without error. All
the errors are related to references to the second class being unknown or
unresolved.

>

Has anyone else experienced anything like this?


Yes. I have a project I work with in the IDE. While files in that project
are open, I occasionally replace some of the binaries the project
references. This causes the red lines.

John



0
Comment actions Permalink

Hello Paul,

could you please clarify: in the case you described, does ReSharper lose
all references to that class at the bottom of the file only,
or to other classes from the project also? Thanks.


Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


I have a very consistent and repeatable problem with Resharper losing
references and flagging all sorts of good code with red lines, when
switching between Debug and Release builds, and doing a build.

However, this only happens reliably in one project, and in one
instance:

I have a WinForms project, and the file that the main form class is
in, has an additional class defined at the bottom. This additional
class is referred to throughout the Winform class.

When I build, then switch from Debug to Release and build again, it
loses all the references to the second class at the bottom of the file
and everything goes red.

It's not 100% repeatable, but it's in the 90% range. It doesn't
always happen, but it happens most of the time. The sequence of
events to get it to happen is "Build solution... switch from Debug to
Release... Build solution".

Sometimes, the red goes away when I switch to another application and
then switch back. Most of the time I close the solution and re-open
it.

Even with all the red, the solution continues to build without error.
All the errors are related to references to the second class being
unknown or unresolved.

Has anyone else experienced anything like this?



0
Comment actions Permalink

"John Saunders" <john.saunders@trizetto.com> wrote in message
news:er5erk$vv7$1@is.intellij.net...

Yes. I have a project I work with in the IDE. While files in that project
are open, I occasionally replace some of the binaries the project
references. This causes the red lines.


This sounds like another issue than what Paul describes, but I had similar
problems which was fixed in build 350 :)
See http://www.jetbrains.net/jira/browse/RSRP-34994

Dag



0
Comment actions Permalink

Generally, only to the class at the bottom of the file. I don't see this
problem in any files or projects that don't have extra utility classes after
the main Form class.

What's weird is that it'll frequently see the class itself, but references
to methods are marked in red. Off the top of my head, I remember most
clearly that the class at the bottom of the file has a constructor that
takes one argument... so all references to new will get flagged with "The
class X has no constructors that take one argument", even though it does,
and in fact, that's the only constructor.

Next time it happens, I'll write down more details, but it happens so
frequently. Not 100% of the time, but far more often than not. It's really
bizarre.

"Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
news:c8a8945d0fec8c920840b958977@news.intellij.net...

Hello Paul,

>

could you please clarify: in the case you described, does ReSharper lose
all references to that class at the bottom of the file only,
or to other classes from the project also? Thanks.

>
>

Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>
>
>> I have a very consistent and repeatable problem with Resharper losing
>> references and flagging all sorts of good code with red lines, when
>> switching between Debug and Release builds, and doing a build.
>>
>> However, this only happens reliably in one project, and in one
>> instance:
>>
>> I have a WinForms project, and the file that the main form class is
>> in, has an additional class defined at the bottom. This additional
>> class is referred to throughout the Winform class.
>>
>> When I build, then switch from Debug to Release and build again, it
>> loses all the references to the second class at the bottom of the file
>> and everything goes red.
>>
>> It's not 100% repeatable, but it's in the 90% range. It doesn't
>> always happen, but it happens most of the time. The sequence of
>> events to get it to happen is "Build solution... switch from Debug to
>> Release... Build solution".
>>
>> Sometimes, the red goes away when I switch to another application and
>> then switch back. Most of the time I close the solution and re-open
>> it.
>>
>> Even with all the red, the solution continues to build without error.
>> All the errors are related to references to the second class being
>> unknown or unresolved.
>>
>> Has anyone else experienced anything like this?
>>
>



0
Comment actions Permalink

It seems to happen on console apps too. The trigger seems to be having a
second class declared in the same file (a utility class) that is used by the
first class in the file... and then switching from Debug to Release, or
Release to Debug.

Suddenly almost all the references to the second class get marked with red
everywhere.

The quick fix seems to be to switch to another application and then switch
back. I didn't realize that fixed it at first, and thought I always had to
close the solution and reopen. But so far now, it's happened three times,
and switching away and back has cleared it up.

So it's not so much a serious problem, as just an annoyance.

It's very repeatable for me. It happens almost daily. In more than just
one project, in more than just one TYPE of project (simple console apps and
Windows Forms aps). I can't be the only person seeing this?


"Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
news:c8a8945d0fec8c920840b958977@news.intellij.net...

Hello Paul,

>

could you please clarify: in the case you described, does ReSharper lose
all references to that class at the bottom of the file only,
or to other classes from the project also? Thanks.

>
>

Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>
>
>> I have a very consistent and repeatable problem with Resharper losing
>> references and flagging all sorts of good code with red lines, when
>> switching between Debug and Release builds, and doing a build.
>>
>> However, this only happens reliably in one project, and in one
>> instance:
>>
>> I have a WinForms project, and the file that the main form class is
>> in, has an additional class defined at the bottom. This additional
>> class is referred to throughout the Winform class.
>>
>> When I build, then switch from Debug to Release and build again, it
>> loses all the references to the second class at the bottom of the file
>> and everything goes red.
>>
>> It's not 100% repeatable, but it's in the 90% range. It doesn't
>> always happen, but it happens most of the time. The sequence of
>> events to get it to happen is "Build solution... switch from Debug to
>> Release... Build solution".
>>
>> Sometimes, the red goes away when I switch to another application and
>> then switch back. Most of the time I close the solution and re-open
>> it.
>>
>> Even with all the red, the solution continues to build without error.
>> All the errors are related to references to the second class being
>> unknown or unresolved.
>>
>> Has anyone else experienced anything like this?
>>
>



0
Comment actions Permalink

Hello Paul,

how do you reference the project in which the class is declared in other
projects - i.e. do you reference it directly or reference its
output assembly?


Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


It seems to happen on console apps too. The trigger seems to be
having a second class declared in the same file (a utility class) that
is used by the first class in the file... and then switching from
Debug to Release, or Release to Debug.

Suddenly almost all the references to the second class get marked with
red everywhere.

The quick fix seems to be to switch to another application and then
switch back. I didn't realize that fixed it at first, and thought I
always had to close the solution and reopen. But so far now, it's
happened three times, and switching away and back has cleared it up.

So it's not so much a serious problem, as just an annoyance.

It's very repeatable for me. It happens almost daily. In more than
just one project, in more than just one TYPE of project (simple
console apps and Windows Forms aps). I can't be the only person
seeing this?

"Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
news:c8a8945d0fec8c920840b958977@news.intellij.net...

>> Hello Paul,
>>
>> could you please clarify: in the case you described, does ReSharper
>> lose
>> all references to that class at the bottom of the file only,
>> or to other classes from the project also? Thanks.
>> Dmitry Shaporenkov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>> I have a very consistent and repeatable problem with Resharper
>>> losing references and flagging all sorts of good code with red
>>> lines, when switching between Debug and Release builds, and doing a
>>> build.
>>>
>>> However, this only happens reliably in one project, and in one
>>> instance:
>>>
>>> I have a WinForms project, and the file that the main form class is
>>> in, has an additional class defined at the bottom. This additional
>>> class is referred to throughout the Winform class.
>>>
>>> When I build, then switch from Debug to Release and build again, it
>>> loses all the references to the second class at the bottom of the
>>> file and everything goes red.
>>>
>>> It's not 100% repeatable, but it's in the 90% range. It doesn't
>>> always happen, but it happens most of the time. The sequence of
>>> events to get it to happen is "Build solution... switch from Debug
>>> to Release... Build solution".
>>>
>>> Sometimes, the red goes away when I switch to another application
>>> and then switch back. Most of the time I close the solution and
>>> re-open it.
>>>
>>> Even with all the red, the solution continues to build without
>>> error. All the errors are related to references to the second class
>>> being unknown or unresolved.
>>>
>>> Has anyone else experienced anything like this?
>>>


0
Comment actions Permalink

I guess I don't understand the question? Or you're not understanding what
I'm saying... There are no other projects, and there are no other
assemblies.

Just two classes in one file. The first class is generated by VS, the
second is a utility class I add at the bottom that is used by the first
class.

The project is very simple. Create a new project (of console app or winform
type). Now add a class to the bottom of the file, within the same
namespace, and refer to this classs from the main class in that file.
That's all. Nothing complicated. No references. Only one project, only
one source code file (excluding resources and other such generated files),
only two classes.


"Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
news:c8a8945d10208c92473a3a6da9c@news.intellij.net...

Hello Paul,

>

how do you reference the project in which the class is declared in other
projects - i.e. do you reference it directly or reference its output
assembly?

>
>

Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>
>
>> It seems to happen on console apps too. The trigger seems to be
>> having a second class declared in the same file (a utility class) that
>> is used by the first class in the file... and then switching from
>> Debug to Release, or Release to Debug.
>>
>> Suddenly almost all the references to the second class get marked with
>> red everywhere.
>>
>> The quick fix seems to be to switch to another application and then
>> switch back. I didn't realize that fixed it at first, and thought I
>> always had to close the solution and reopen. But so far now, it's
>> happened three times, and switching away and back has cleared it up.
>>
>> So it's not so much a serious problem, as just an annoyance.
>>
>> It's very repeatable for me. It happens almost daily. In more than
>> just one project, in more than just one TYPE of project (simple
>> console apps and Windows Forms aps). I can't be the only person
>> seeing this?
>>
>> "Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
>> news:c8a8945d0fec8c920840b958977@news.intellij.net...
>>
>>> Hello Paul,
>>>
>>> could you please clarify: in the case you described, does ReSharper
>>> lose
>>> all references to that class at the bottom of the file only,
>>> or to other classes from the project also? Thanks.
>>> Dmitry Shaporenkov
>>> JetBrains, Inc
>>> http://www.jetbrains.com
>>> "Develop with pleasure!"
>>>> I have a very consistent and repeatable problem with Resharper
>>>> losing references and flagging all sorts of good code with red
>>>> lines, when switching between Debug and Release builds, and doing a
>>>> build.
>>>>
>>>> However, this only happens reliably in one project, and in one
>>>> instance:
>>>>
>>>> I have a WinForms project, and the file that the main form class is
>>>> in, has an additional class defined at the bottom. This additional
>>>> class is referred to throughout the Winform class.
>>>>
>>>> When I build, then switch from Debug to Release and build again, it
>>>> loses all the references to the second class at the bottom of the
>>>> file and everything goes red.
>>>>
>>>> It's not 100% repeatable, but it's in the 90% range. It doesn't
>>>> always happen, but it happens most of the time. The sequence of
>>>> events to get it to happen is "Build solution... switch from Debug
>>>> to Release... Build solution".
>>>>
>>>> Sometimes, the red goes away when I switch to another application
>>>> and then switch back. Most of the time I close the solution and
>>>> re-open it.
>>>>
>>>> Even with all the red, the solution continues to build without
>>>> error. All the errors are related to references to the second class
>>>> being unknown or unresolved.
>>>>
>>>> Has anyone else experienced anything like this?
>>>>
>



0
Comment actions Permalink

I was able to reproduce this, but only once (right after a reboot, not that
it should matter). I'm using build 350, screenshot is attached.

Alt+Tab to another application and back to VS fixed the problem, ie the
symbol was recognized as expected.

After the first attempt, I closed Visual Studio, started Visual Studio
again, created a new project and typed exact the same code as in the first
attempt. The bug didn't appear this time, nor did it appear on a couple
other attempts I did.


"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:erke1q$a97$1@is.intellij.net...
>I guess I don't understand the question? Or you're not understanding what

I'm saying... There are no other projects, and there are no other
assemblies.

>

Just two classes in one file. The first class is generated by VS, the
second is a utility class I add at the bottom that is used by the first
class.

>

The project is very simple. Create a new project (of console app or
winform
type). Now add a class to the bottom of the file, within the same
namespace, and refer to this classs from the main class in that file.
That's all. Nothing complicated. No references. Only one project, only
one source code file (excluding resources and other such generated files),
only two classes.

>
>

"Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
news:c8a8945d10208c92473a3a6da9c@news.intellij.net...

>> Hello Paul,
>>
>> how do you reference the project in which the class is declared in other
>> projects - i.e. do you reference it directly or reference its output
>> assembly?
>>
>>
>> Dmitry Shaporenkov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>
>>
>>
>>> It seems to happen on console apps too. The trigger seems to be
>>> having a second class declared in the same file (a utility class) that
>>> is used by the first class in the file... and then switching from
>>> Debug to Release, or Release to Debug.
>>>
>>> Suddenly almost all the references to the second class get marked with
>>> red everywhere.
>>>
>>> The quick fix seems to be to switch to another application and then
>>> switch back. I didn't realize that fixed it at first, and thought I
>>> always had to close the solution and reopen. But so far now, it's
>>> happened three times, and switching away and back has cleared it up.
>>>
>>> So it's not so much a serious problem, as just an annoyance.
>>>
>>> It's very repeatable for me. It happens almost daily. In more than
>>> just one project, in more than just one TYPE of project (simple
>>> console apps and Windows Forms aps). I can't be the only person
>>> seeing this?
>>>
>>> "Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
>>> news:c8a8945d0fec8c920840b958977@news.intellij.net...
>>>
>>>> Hello Paul,
>>>>
>>>> could you please clarify: in the case you described, does ReSharper
>>>> lose
>>>> all references to that class at the bottom of the file only,
>>>> or to other classes from the project also? Thanks.
>>>> Dmitry Shaporenkov
>>>> JetBrains, Inc
>>>> http://www.jetbrains.com
>>>> "Develop with pleasure!"
>>>>> I have a very consistent and repeatable problem with Resharper
>>>>> losing references and flagging all sorts of good code with red
>>>>> lines, when switching between Debug and Release builds, and doing a
>>>>> build.
>>>>>
>>>>> However, this only happens reliably in one project, and in one
>>>>> instance:
>>>>>
>>>>> I have a WinForms project, and the file that the main form class is
>>>>> in, has an additional class defined at the bottom. This additional
>>>>> class is referred to throughout the Winform class.
>>>>>
>>>>> When I build, then switch from Debug to Release and build again, it
>>>>> loses all the references to the second class at the bottom of the
>>>>> file and everything goes red.
>>>>>
>>>>> It's not 100% repeatable, but it's in the 90% range. It doesn't
>>>>> always happen, but it happens most of the time. The sequence of
>>>>> events to get it to happen is "Build solution... switch from Debug
>>>>> to Release... Build solution".
>>>>>
>>>>> Sometimes, the red goes away when I switch to another application
>>>>> and then switch back. Most of the time I close the solution and
>>>>> re-open it.
>>>>>
>>>>> Even with all the red, the solution continues to build without
>>>>> error. All the errors are related to references to the second class
>>>>> being unknown or unresolved.
>>>>>
>>>>> Has anyone else experienced anything like this?
>>>>>
>>
>>
>






Attachment(s):
bug.JPG
0
Comment actions Permalink

Hello Paul,

that's really odd - I'll try to repeat it. Thanks for reporting.


Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


I guess I don't understand the question? Or you're not understanding
what I'm saying... There are no other projects, and there are no
other assemblies.

Just two classes in one file. The first class is generated by VS,
the second is a utility class I add at the bottom that is used by the
first class.

The project is very simple. Create a new project (of console app or
winform type). Now add a class to the bottom of the file, within the
same namespace, and refer to this classs from the main class in that
file. That's all. Nothing complicated. No references. Only one
project, only one source code file (excluding resources and other such
generated files), only two classes.

"Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
news:c8a8945d10208c92473a3a6da9c@news.intellij.net...

>> Hello Paul,
>>
>> how do you reference the project in which the class is declared in
>> other projects - i.e. do you reference it directly or reference its
>> output assembly?
>>
>> Dmitry Shaporenkov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>> It seems to happen on console apps too. The trigger seems to be
>>> having a second class declared in the same file (a utility class)
>>> that is used by the first class in the file... and then switching
>>> from Debug to Release, or Release to Debug.
>>>
>>> Suddenly almost all the references to the second class get marked
>>> with red everywhere.
>>>
>>> The quick fix seems to be to switch to another application and then
>>> switch back. I didn't realize that fixed it at first, and thought I
>>> always had to close the solution and reopen. But so far now, it's
>>> happened three times, and switching away and back has cleared it up.
>>>
>>> So it's not so much a serious problem, as just an annoyance.
>>>
>>> It's very repeatable for me. It happens almost daily. In more than
>>> just one project, in more than just one TYPE of project (simple
>>> console apps and Windows Forms aps). I can't be the only person
>>> seeing this?
>>>
>>> "Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
>>> news:c8a8945d0fec8c920840b958977@news.intellij.net...
>>>
>>>> Hello Paul,
>>>>
>>>> could you please clarify: in the case you described, does ReSharper
>>>> lose
>>>> all references to that class at the bottom of the file only,
>>>> or to other classes from the project also? Thanks.
>>>> Dmitry Shaporenkov
>>>> JetBrains, Inc
>>>> http://www.jetbrains.com
>>>> "Develop with pleasure!"
>>>>> I have a very consistent and repeatable problem with Resharper
>>>>> losing references and flagging all sorts of good code with red
>>>>> lines, when switching between Debug and Release builds, and doing
>>>>> a build.
>>>>>
>>>>> However, this only happens reliably in one project, and in one
>>>>> instance:
>>>>>
>>>>> I have a WinForms project, and the file that the main form class
>>>>> is in, has an additional class defined at the bottom. This
>>>>> additional class is referred to throughout the Winform class.
>>>>>
>>>>> When I build, then switch from Debug to Release and build again,
>>>>> it loses all the references to the second class at the bottom of
>>>>> the file and everything goes red.
>>>>>
>>>>> It's not 100% repeatable, but it's in the 90% range. It doesn't
>>>>> always happen, but it happens most of the time. The sequence of
>>>>> events to get it to happen is "Build solution... switch from Debug
>>>>> to Release... Build solution".
>>>>>
>>>>> Sometimes, the red goes away when I switch to another application
>>>>> and then switch back. Most of the time I close the solution and
>>>>> re-open it.
>>>>>
>>>>> Even with all the red, the solution continues to build without
>>>>> error. All the errors are related to references to the second
>>>>> class being unknown or unresolved.
>>>>>
>>>>> Has anyone else experienced anything like this?
>>>>>


0
Comment actions Permalink

It almost always happens to me after loading a solution and then doing some
work and then the "build, switch to release, build again" thing.... or just
noticing it's still in release mode, so switching back to debug.

Once it happens, it rarely happens again right away. I.E. once I alt-tab
away and back, and it fixes up, it works fine and I can switch back and
forth a lot without problems. Until I close it and re-open it. Even then
it's not 100% repeatable, but it is 80% repeatable or so.

"Dag Christensen" <anonymous@noreply.com> wrote in message
news:erks5f$9f8$1@is.intellij.net...
>I was able to reproduce this, but only once (right after a reboot, not that
>it should matter). I'm using build 350, screenshot is attached.
>

Alt+Tab to another application and back to VS fixed the problem, ie the
symbol was recognized as expected.

>

After the first attempt, I closed Visual Studio, started Visual Studio
again, created a new project and typed exact the same code as in the first
attempt. The bug didn't appear this time, nor did it appear on a couple
other attempts I did.

>
>

"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:erke1q$a97$1@is.intellij.net...

>>I guess I don't understand the question? Or you're not understanding what
>> I'm saying... There are no other projects, and there are no other
>> assemblies.
>>
>> Just two classes in one file. The first class is generated by VS, the
>> second is a utility class I add at the bottom that is used by the first
>> class.
>>
>> The project is very simple. Create a new project (of console app or
>> winform
>> type). Now add a class to the bottom of the file, within the same
>> namespace, and refer to this classs from the main class in that file.
>> That's all. Nothing complicated. No references. Only one project, only
>> one source code file (excluding resources and other such generated
>> files),
>> only two classes.
>>
>>
>> "Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
>> news:c8a8945d10208c92473a3a6da9c@news.intellij.net...
>>> Hello Paul,
>>>
>>> how do you reference the project in which the class is declared in other
>>> projects - i.e. do you reference it directly or reference its output
>>> assembly?
>>>
>>>
>>> Dmitry Shaporenkov
>>> JetBrains, Inc
>>> http://www.jetbrains.com
>>> "Develop with pleasure!"
>>>
>>>
>>>
>>>> It seems to happen on console apps too. The trigger seems to be
>>>> having a second class declared in the same file (a utility class) that
>>>> is used by the first class in the file... and then switching from
>>>> Debug to Release, or Release to Debug.
>>>>
>>>> Suddenly almost all the references to the second class get marked with
>>>> red everywhere.
>>>>
>>>> The quick fix seems to be to switch to another application and then
>>>> switch back. I didn't realize that fixed it at first, and thought I
>>>> always had to close the solution and reopen. But so far now, it's
>>>> happened three times, and switching away and back has cleared it up.
>>>>
>>>> So it's not so much a serious problem, as just an annoyance.
>>>>
>>>> It's very repeatable for me. It happens almost daily. In more than
>>>> just one project, in more than just one TYPE of project (simple
>>>> console apps and Windows Forms aps). I can't be the only person
>>>> seeing this?
>>>>
>>>> "Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
>>>> news:c8a8945d0fec8c920840b958977@news.intellij.net...
>>>>
>>>>> Hello Paul,
>>>>>
>>>>> could you please clarify: in the case you described, does ReSharper
>>>>> lose
>>>>> all references to that class at the bottom of the file only,
>>>>> or to other classes from the project also? Thanks.
>>>>> Dmitry Shaporenkov
>>>>> JetBrains, Inc
>>>>> http://www.jetbrains.com
>>>>> "Develop with pleasure!"
>>>>>> I have a very consistent and repeatable problem with Resharper
>>>>>> losing references and flagging all sorts of good code with red
>>>>>> lines, when switching between Debug and Release builds, and doing a
>>>>>> build.
>>>>>>
>>>>>> However, this only happens reliably in one project, and in one
>>>>>> instance:
>>>>>>
>>>>>> I have a WinForms project, and the file that the main form class is
>>>>>> in, has an additional class defined at the bottom. This additional
>>>>>> class is referred to throughout the Winform class.
>>>>>>
>>>>>> When I build, then switch from Debug to Release and build again, it
>>>>>> loses all the references to the second class at the bottom of the
>>>>>> file and everything goes red.
>>>>>>
>>>>>> It's not 100% repeatable, but it's in the 90% range. It doesn't
>>>>>> always happen, but it happens most of the time. The sequence of
>>>>>> events to get it to happen is "Build solution... switch from Debug
>>>>>> to Release... Build solution".
>>>>>>
>>>>>> Sometimes, the red goes away when I switch to another application
>>>>>> and then switch back. Most of the time I close the solution and
>>>>>> re-open it.
>>>>>>
>>>>>> Even with all the red, the solution continues to build without
>>>>>> error. All the errors are related to references to the second class
>>>>>> being unknown or unresolved.
>>>>>>
>>>>>> Has anyone else experienced anything like this?
>>>>>>
>>>
>>>
>>
>>
>
>



0
Comment actions Permalink

Just yesterday I experienced it yet again... switching from Release to
Debug, all the references went bad. Alt-Tabbing to another app and back
didn't fix it. I had to do a full build, then Alt-Tab away and back for the
references to be recognized again.


"Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
news:c8a8945d10328c9253d3df20998@news.intellij.net...

Hello Paul,

>

that's really odd - I'll try to repeat it. Thanks for reporting.

>
>

Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>
>
>> I guess I don't understand the question? Or you're not understanding
>> what I'm saying... There are no other projects, and there are no
>> other assemblies.
>>
>> Just two classes in one file. The first class is generated by VS,
>> the second is a utility class I add at the bottom that is used by the
>> first class.
>>
>> The project is very simple. Create a new project (of console app or
>> winform type). Now add a class to the bottom of the file, within the
>> same namespace, and refer to this classs from the main class in that
>> file. That's all. Nothing complicated. No references. Only one
>> project, only one source code file (excluding resources and other such
>> generated files), only two classes.
>>
>> "Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
>> news:c8a8945d10208c92473a3a6da9c@news.intellij.net...
>>
>>> Hello Paul,
>>>
>>> how do you reference the project in which the class is declared in
>>> other projects - i.e. do you reference it directly or reference its
>>> output assembly?
>>>
>>> Dmitry Shaporenkov
>>> JetBrains, Inc
>>> http://www.jetbrains.com
>>> "Develop with pleasure!"
>>>> It seems to happen on console apps too. The trigger seems to be
>>>> having a second class declared in the same file (a utility class)
>>>> that is used by the first class in the file... and then switching
>>>> from Debug to Release, or Release to Debug.
>>>>
>>>> Suddenly almost all the references to the second class get marked
>>>> with red everywhere.
>>>>
>>>> The quick fix seems to be to switch to another application and then
>>>> switch back. I didn't realize that fixed it at first, and thought I
>>>> always had to close the solution and reopen. But so far now, it's
>>>> happened three times, and switching away and back has cleared it up.
>>>>
>>>> So it's not so much a serious problem, as just an annoyance.
>>>>
>>>> It's very repeatable for me. It happens almost daily. In more than
>>>> just one project, in more than just one TYPE of project (simple
>>>> console apps and Windows Forms aps). I can't be the only person
>>>> seeing this?
>>>>
>>>> "Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
>>>> news:c8a8945d0fec8c920840b958977@news.intellij.net...
>>>>
>>>>> Hello Paul,
>>>>>
>>>>> could you please clarify: in the case you described, does ReSharper
>>>>> lose
>>>>> all references to that class at the bottom of the file only,
>>>>> or to other classes from the project also? Thanks.
>>>>> Dmitry Shaporenkov
>>>>> JetBrains, Inc
>>>>> http://www.jetbrains.com
>>>>> "Develop with pleasure!"
>>>>>> I have a very consistent and repeatable problem with Resharper
>>>>>> losing references and flagging all sorts of good code with red
>>>>>> lines, when switching between Debug and Release builds, and doing
>>>>>> a build.
>>>>>>
>>>>>> However, this only happens reliably in one project, and in one
>>>>>> instance:
>>>>>>
>>>>>> I have a WinForms project, and the file that the main form class
>>>>>> is in, has an additional class defined at the bottom. This
>>>>>> additional class is referred to throughout the Winform class.
>>>>>>
>>>>>> When I build, then switch from Debug to Release and build again,
>>>>>> it loses all the references to the second class at the bottom of
>>>>>> the file and everything goes red.
>>>>>>
>>>>>> It's not 100% repeatable, but it's in the 90% range. It doesn't
>>>>>> always happen, but it happens most of the time. The sequence of
>>>>>> events to get it to happen is "Build solution... switch from Debug
>>>>>> to Release... Build solution".
>>>>>>
>>>>>> Sometimes, the red goes away when I switch to another application
>>>>>> and then switch back. Most of the time I close the solution and
>>>>>> re-open it.
>>>>>>
>>>>>> Even with all the red, the solution continues to build without
>>>>>> error. All the errors are related to references to the second
>>>>>> class being unknown or unresolved.
>>>>>>
>>>>>> Has anyone else experienced anything like this?
>>>>>>
>



0

Please sign in to leave a comment.