Build 235 -- still some Bogus Ambiguous Reference/Duplicate Defintion errors

Much better than the previous build, but there's still a couple of projects
in my over-all solution where I'm getting bogus "Ambiguous Reference"
errors, and a bogus "Duplicate Definition" error on some classes.

If I position the cursor on the "Ambiguous Reference" error and Goto
Definition, it'll show two identical defitions for me to choose from (no
difference at all). If I click one, I'm taken to the object browser, and if
I click the other, I'm taken to the actual class. It's this class that is
flagged as "Duplicate Definition". If I right-click Goto Definition, it
takes me to right where I am, no indication that there are multiple class
definitions. I don't know where it's getting this from.

I do believe this must be due to the DLL refereces though. And I think I
might know why. We (for reasons unknown to me, but it's not changing) have
two bin directories where DLLs are copied to... one for the application, and
one for tests to run from. Don't ask why, I don't know. But I think maybe
it's somehow seeing a reference to ABC.DLL in one of those directories as
somehow different than a reference to the same ABC.DLL in the other
directory. I say this because I'm only seeing the problem in my test
projects, not any of the other ones.

What that doesn't explain, though, is why the class "Foo" in my TestSetup
proejct is flagged as a duplicate. It's only declared in this one file,
period... I have no idea what Resharper is looking at to think there is
another copy of this class somewhere.

Obviously there are no partial classes involved, no duplicate class
definitions, and it builds and runs just fine. ReSharper is just getting
confused somehow, somewhere.

Since all my non-Test projects and classes are fine, at least I don't have
to roll back to a previous version of Resharper, but this still is a serious
issue, and this wasn't a problem in previous builds so it's a regression.
If there's something specific I can look at or give you information about,
I'll be more than glad to try and help out.



15 comments
Comment actions Permalink

Paul,

first off, thank you for the great feedback.

I have a couple of questions inline.
Paul Bradshaw wrote:

Much better than the previous build, but there's still a couple of projects
in my over-all solution where I'm getting bogus "Ambiguous Reference"
errors, and a bogus "Duplicate Definition" error on some classes.

If I position the cursor on the "Ambiguous Reference" error and Goto
Definition, it'll show two identical defitions for me to choose from (no
difference at all). If I click one, I'm taken to the object browser, and if
I click the other, I'm taken to the actual class. It's this class that is
flagged as "Duplicate Definition". If I right-click Goto Definition, it
takes me to right where I am, no indication that there are multiple class
definitions. I don't know where it's getting this from.

I do believe this must be due to the DLL refereces though. And I think I
might know why. We (for reasons unknown to me, but it's not changing) have
two bin directories where DLLs are copied to... one for the application, and
one for tests to run from. Don't ask why, I don't know. But I think maybe
it's somehow seeing a reference to ABC.DLL in one of those directories as
somehow different than a reference to the same ABC.DLL in the other
directory. I say this because I'm only seeing the problem in my test
projects, not any of the other ones.


Yes, you are absolutely correct in relating this to .dll references.
At the moment ReSharper adopts the following policy: If your project
references an assembly with short name identical to assembly output name
of one of your C# project, ReSharper happily assumes that you reference
that project.

It will be of great help to us if you could provide a small solution
with a setup similar to what you have, that reproduces the problem.
So far I failed to reproduce it from your description. Will keep trying,
though.


What that doesn't explain, though, is why the class "Foo" in my TestSetup
proejct is flagged as a duplicate. It's only declared in this one file,
period... I have no idea what Resharper is looking at to think there is
another copy of this class somewhere.


Does it happen occasionally or always? Does it go away after VS restart?
Does it go away after you clean ReSharper caches? It it only one class
that is reported as duplicated?

Thanks in advance,
Friendly,
Dmitry
--
Dmitry Lomov
Senior Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop With Pleasure!"

0
Comment actions Permalink

I am also seeing numerous Ambiguous Reference errors. When you click on the
light bulb to fix the problem, there are two lines saying use class xxx.
The projects in my solution do not reference other projects directly - they
reference dlls which have been copied to a separate directory.
If I select a project that does not reference any others in my solution, it
also shows the problem.

If I load that same project in a separate solution on its own, the Ambiguous
Reference errors do not appear.

Also, a minor annoyance, if you uncheck the Startup checkbox for ReSharper
in the Add-ins dialog, it always comes back as checked.

Jeff

"Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in message
news:e1o499$l3g$1@is.intellij.net...

Paul,

>

first off, thank you for the great feedback.

>

I have a couple of questions inline.
Paul Bradshaw wrote:

>> Much better than the previous build, but there's still a couple of
>> projects in my over-all solution where I'm getting bogus "Ambiguous
>> Reference" errors, and a bogus "Duplicate Definition" error on some
>> classes.
>>
>> If I position the cursor on the "Ambiguous Reference" error and Goto
>> Definition, it'll show two identical defitions for me to choose from (no
>> difference at all). If I click one, I'm taken to the object browser, and
>> if I click the other, I'm taken to the actual class. It's this class
>> that is flagged as "Duplicate Definition". If I right-click Goto
>> Definition, it takes me to right where I am, no indication that there are
>> multiple class definitions. I don't know where it's getting this from.
>>
>> I do believe this must be due to the DLL refereces though. And I think I
>> might know why. We (for reasons unknown to me, but it's not changing)
>> have two bin directories where DLLs are copied to... one for the
>> application, and one for tests to run from. Don't ask why, I don't know.
>> But I think maybe it's somehow seeing a reference to ABC.DLL in one of
>> those directories as somehow different than a reference to the same
>> ABC.DLL in the other directory. I say this because I'm only seeing the
>> problem in my test projects, not any of the other ones.
>

Yes, you are absolutely correct in relating this to .dll references.
At the moment ReSharper adopts the following policy: If your project
references an assembly with short name identical to assembly output name
of one of your C# project, ReSharper happily assumes that you reference
that project.

>

It will be of great help to us if you could provide a small solution with
a setup similar to what you have, that reproduces the problem.
So far I failed to reproduce it from your description. Will keep trying,
though.

>
>>
>> What that doesn't explain, though, is why the class "Foo" in my TestSetup
>> proejct is flagged as a duplicate. It's only declared in this one file,
>> period... I have no idea what Resharper is looking at to think there is
>> another copy of this class somewhere.
>

Does it happen occasionally or always? Does it go away after VS restart?
Does it go away after you clean ReSharper caches? It it only one class
that is reported as duplicated?

>

Thanks in advance,
Friendly,
Dmitry
--
Dmitry Lomov
Senior Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop With Pleasure!"



0
Comment actions Permalink

Hello Jeff,

unfortunately, this is a known problem of VS 2005 - it doesn't remember the
state of the check box
when an add-in is installed for all users, not only for the current one.


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


Also, a minor annoyance, if you uncheck the Startup checkbox for
ReSharper in the Add-ins dialog, it always comes back as checked.



0
Comment actions Permalink

Does it happen occasionally or always? Does it go away after VS restart?
Does it go away after you clean ReSharper caches? It it only one class
that is reported as duplicated?


It happens always. Restarts and clearing caches doesn't help. It's always
exactly the same classes as well. Specifically, it is every single class in
two of my solutions 9 projects and 1 website. I swear I can't see what
makes these two projects so special at this point, but my experience is much
like Jeff's experience from what I can tell. Actually, these two projects
do stand out in that they're utility projects meant to set up data in the
database for use by the "Test" projects. So let me break it down here:

I have project A, B, C, and D that are part of my application. These
projects live in "C:\Myapp\A", "C:\Myapp\B", etc. The DLLs generated by
these projects are copied by a post-build step to two locations:
"C:\Myapp\bin" and "C:\Myapp\Test\bin". When these projects reference each
other, they do it with a DLL reference to the DLLs in C:\Myapp\Bin.

There are two test projects, TestA, and TestB as well. They are also copied
to both locations, and live in the expected places. These tests reference
the A,B,C DLLs as DLL references in C:\Myapp\Bin.

There are two additional test projects, TestASetup, and TestBSetup. These
projects live in a directory under the approprate Test* project (i.e.
C:\Myapp\TestA\TestASetup"). They reference the A, B, C, etc DLLs from
C:\Myapp\Test\Bin. These Test Setup projects are only referenced by TestA
and TestB... TestA references TestASetup as a DLL reference from
C:\MyApp\Test\Bin.

Now, I see all classes and references in the original A, B, C projects
working just fine and as expected.

I see all classes defined in TestASetup and TestBSetup as "Duplicate
Definition" for some reason.

In the TestA and TestB projects, I see all references to methods defined in
TestASetup and/or TestBSetup as "ambigious", and attempting to Go To
Definition will show me two results: one which takes me to a class browser,
and one which takes me to the actual project source file.

The project structure is odd, but it's been that way forever, and Resharper
1.5 had no problems, and previous builds (I forget exactly which numbers) of
Resharper 2.0 didn't seem to exhibit this confusion. There project compiles
and builds fine.

There's definitely something in common with the classes that exhibit the
problem, but I'm failing to see what the connection is, or what is causing
Resharper to become confused in the specific way it is... I wish I had time
to try and generate a small test solution that exhibited the problem, but
I'm honestly swamped at work and for now this is the best that I can do.
Please let me know if you need any more information, and if I get some spare
time down the road, I'll do my best to try and duplicate the problem with a
small solution starting from scratch (but please don't count on that
happening!)




"Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in message
news:e1o499$l3g$1@is.intellij.net...

Paul,

>

first off, thank you for the great feedback.

>

I have a couple of questions inline.
Paul Bradshaw wrote:

>> Much better than the previous build, but there's still a couple of
>> projects in my over-all solution where I'm getting bogus "Ambiguous
>> Reference" errors, and a bogus "Duplicate Definition" error on some
>> classes.
>>
>> If I position the cursor on the "Ambiguous Reference" error and Goto
>> Definition, it'll show two identical defitions for me to choose from (no
>> difference at all). If I click one, I'm taken to the object browser, and
>> if I click the other, I'm taken to the actual class. It's this class
>> that is flagged as "Duplicate Definition". If I right-click Goto
>> Definition, it takes me to right where I am, no indication that there are
>> multiple class definitions. I don't know where it's getting this from.
>>
>> I do believe this must be due to the DLL refereces though. And I think I
>> might know why. We (for reasons unknown to me, but it's not changing)
>> have two bin directories where DLLs are copied to... one for the
>> application, and one for tests to run from. Don't ask why, I don't know.
>> But I think maybe it's somehow seeing a reference to ABC.DLL in one of
>> those directories as somehow different than a reference to the same
>> ABC.DLL in the other directory. I say this because I'm only seeing the
>> problem in my test projects, not any of the other ones.
>

Yes, you are absolutely correct in relating this to .dll references.
At the moment ReSharper adopts the following policy: If your project
references an assembly with short name identical to assembly output name
of one of your C# project, ReSharper happily assumes that you reference
that project.

>

It will be of great help to us if you could provide a small solution with
a setup similar to what you have, that reproduces the problem.
So far I failed to reproduce it from your description. Will keep trying,
though.

>
>>
>> What that doesn't explain, though, is why the class "Foo" in my TestSetup
>> proejct is flagged as a duplicate. It's only declared in this one file,
>> period... I have no idea what Resharper is looking at to think there is
>> another copy of this class somewhere.
>

Does it happen occasionally or always? Does it go away after VS restart?
Does it go away after you clean ReSharper caches? It it only one class
that is reported as duplicated?

>

Thanks in advance,
Friendly,
Dmitry
--
Dmitry Lomov
Senior Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop With Pleasure!"



0
Comment actions Permalink

Paul,

thank you very much. I will try to reproduce this following your
descriptions.
What you did already is extremely helpful, but certainly a small project
will be better - but I do understand being swamped at work - believe me!

I'll let you know on my progress,

Thanks again,
Cheers,
Dmitry

Paul Bradshaw wrote:
>> Does it happen occasionally or always? Does it go away after VS restart?
>> Does it go away after you clean ReSharper caches? It it only one class
>> that is reported as duplicated?


It happens always. Restarts and clearing caches doesn't help. It's always
exactly the same classes as well. Specifically, it is every single class in
two of my solutions 9 projects and 1 website. I swear I can't see what
makes these two projects so special at this point, but my experience is much
like Jeff's experience from what I can tell. Actually, these two projects
do stand out in that they're utility projects meant to set up data in the
database for use by the "Test" projects. So let me break it down here:

I have project A, B, C, and D that are part of my application. These
projects live in "C:\Myapp\A", "C:\Myapp\B", etc. The DLLs generated by
these projects are copied by a post-build step to two locations:
"C:\Myapp\bin" and "C:\Myapp\Test\bin". When these projects reference each
other, they do it with a DLL reference to the DLLs in C:\Myapp\Bin.

There are two test projects, TestA, and TestB as well. They are also copied
to both locations, and live in the expected places. These tests reference
the A,B,C DLLs as DLL references in C:\Myapp\Bin.

There are two additional test projects, TestASetup, and TestBSetup. These
projects live in a directory under the approprate Test* project (i.e.
C:\Myapp\TestA\TestASetup"). They reference the A, B, C, etc DLLs from
C:\Myapp\Test\Bin. These Test Setup projects are only referenced by TestA
and TestB... TestA references TestASetup as a DLL reference from
C:\MyApp\Test\Bin.

Now, I see all classes and references in the original A, B, C projects
working just fine and as expected.

I see all classes defined in TestASetup and TestBSetup as "Duplicate
Definition" for some reason.

In the TestA and TestB projects, I see all references to methods defined in
TestASetup and/or TestBSetup as "ambigious", and attempting to Go To
Definition will show me two results: one which takes me to a class browser,
and one which takes me to the actual project source file.

The project structure is odd, but it's been that way forever, and Resharper
1.5 had no problems, and previous builds (I forget exactly which numbers) of
Resharper 2.0 didn't seem to exhibit this confusion. There project compiles
and builds fine.

There's definitely something in common with the classes that exhibit the
problem, but I'm failing to see what the connection is, or what is causing
Resharper to become confused in the specific way it is... I wish I had time
to try and generate a small test solution that exhibited the problem, but
I'm honestly swamped at work and for now this is the best that I can do.
Please let me know if you need any more information, and if I get some spare
time down the road, I'll do my best to try and duplicate the problem with a
small solution starting from scratch (but please don't count on that
happening!)




"Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in message
news:e1o499$l3g$1@is.intellij.net...

>> Paul,
>>
>> first off, thank you for the great feedback.
>>
>> I have a couple of questions inline.
>> Paul Bradshaw wrote:
>>> Much better than the previous build, but there's still a couple of
>>> projects in my over-all solution where I'm getting bogus "Ambiguous
>>> Reference" errors, and a bogus "Duplicate Definition" error on some
>>> classes.
>>>
>>> If I position the cursor on the "Ambiguous Reference" error and Goto
>>> Definition, it'll show two identical defitions for me to choose from (no
>>> difference at all). If I click one, I'm taken to the object browser, and
>>> if I click the other, I'm taken to the actual class. It's this class
>>> that is flagged as "Duplicate Definition". If I right-click Goto
>>> Definition, it takes me to right where I am, no indication that there are
>>> multiple class definitions. I don't know where it's getting this from.
>>>
>>> I do believe this must be due to the DLL refereces though. And I think I
>>> might know why. We (for reasons unknown to me, but it's not changing)
>>> have two bin directories where DLLs are copied to... one for the
>>> application, and one for tests to run from. Don't ask why, I don't know.
>>> But I think maybe it's somehow seeing a reference to ABC.DLL in one of
>>> those directories as somehow different than a reference to the same
>>> ABC.DLL in the other directory. I say this because I'm only seeing the
>>> problem in my test projects, not any of the other ones.
>> Yes, you are absolutely correct in relating this to .dll references.
>> At the moment ReSharper adopts the following policy: If your project
>> references an assembly with short name identical to assembly output name
>> of one of your C# project, ReSharper happily assumes that you reference
>> that project.
>>
>> It will be of great help to us if you could provide a small solution with
>> a setup similar to what you have, that reproduces the problem.
>> So far I failed to reproduce it from your description. Will keep trying,
>> though.
>>
>>> What that doesn't explain, though, is why the class "Foo" in my TestSetup
>>> proejct is flagged as a duplicate. It's only declared in this one file,
>>> period... I have no idea what Resharper is looking at to think there is
>>> another copy of this class somewhere.
>> Does it happen occasionally or always? Does it go away after VS restart?
>> Does it go away after you clean ReSharper caches? It it only one class
>> that is reported as duplicated?
>>
>> Thanks in advance,
>> Friendly,
>> Dmitry
>> --
>> Dmitry Lomov
>> Senior Software Developer
>> JetBrains Inc.
>> http://www.jetbrains.com
>> "Develop With Pleasure!"




--
Dmitry Lomov
Senior Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop With Pleasure!"

0
Comment actions Permalink

Paul,

I am afraid I still cannot reproduce this, even with your very elaborate
description...
Is TestASetup referenced only from TestA? Is there any project
reference to TestASetup somewhere?

Thanks in advance,
Friendly,
Dmitry
Paul Bradshaw wrote:
>> Does it happen occasionally or always? Does it go away after VS restart?
>> Does it go away after you clean ReSharper caches? It it only one class
>> that is reported as duplicated?


It happens always. Restarts and clearing caches doesn't help. It's always
exactly the same classes as well. Specifically, it is every single class in
two of my solutions 9 projects and 1 website. I swear I can't see what
makes these two projects so special at this point, but my experience is much
like Jeff's experience from what I can tell. Actually, these two projects
do stand out in that they're utility projects meant to set up data in the
database for use by the "Test" projects. So let me break it down here:

I have project A, B, C, and D that are part of my application. These
projects live in "C:\Myapp\A", "C:\Myapp\B", etc. The DLLs generated by
these projects are copied by a post-build step to two locations:
"C:\Myapp\bin" and "C:\Myapp\Test\bin". When these projects reference each
other, they do it with a DLL reference to the DLLs in C:\Myapp\Bin.

There are two test projects, TestA, and TestB as well. They are also copied
to both locations, and live in the expected places. These tests reference
the A,B,C DLLs as DLL references in C:\Myapp\Bin.

There are two additional test projects, TestASetup, and TestBSetup. These
projects live in a directory under the approprate Test* project (i.e.
C:\Myapp\TestA\TestASetup"). They reference the A, B, C, etc DLLs from
C:\Myapp\Test\Bin. These Test Setup projects are only referenced by TestA
and TestB... TestA references TestASetup as a DLL reference from
C:\MyApp\Test\Bin.

Now, I see all classes and references in the original A, B, C projects
working just fine and as expected.

I see all classes defined in TestASetup and TestBSetup as "Duplicate
Definition" for some reason.

In the TestA and TestB projects, I see all references to methods defined in
TestASetup and/or TestBSetup as "ambigious", and attempting to Go To
Definition will show me two results: one which takes me to a class browser,
and one which takes me to the actual project source file.

The project structure is odd, but it's been that way forever, and Resharper
1.5 had no problems, and previous builds (I forget exactly which numbers) of
Resharper 2.0 didn't seem to exhibit this confusion. There project compiles
and builds fine.

There's definitely something in common with the classes that exhibit the
problem, but I'm failing to see what the connection is, or what is causing
Resharper to become confused in the specific way it is... I wish I had time
to try and generate a small test solution that exhibited the problem, but
I'm honestly swamped at work and for now this is the best that I can do.
Please let me know if you need any more information, and if I get some spare
time down the road, I'll do my best to try and duplicate the problem with a
small solution starting from scratch (but please don't count on that
happening!)




"Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in message
news:e1o499$l3g$1@is.intellij.net...

>> Paul,
>>
>> first off, thank you for the great feedback.
>>
>> I have a couple of questions inline.
>> Paul Bradshaw wrote:
>>> Much better than the previous build, but there's still a couple of
>>> projects in my over-all solution where I'm getting bogus "Ambiguous
>>> Reference" errors, and a bogus "Duplicate Definition" error on some
>>> classes.
>>>
>>> If I position the cursor on the "Ambiguous Reference" error and Goto
>>> Definition, it'll show two identical defitions for me to choose from (no
>>> difference at all). If I click one, I'm taken to the object browser, and
>>> if I click the other, I'm taken to the actual class. It's this class
>>> that is flagged as "Duplicate Definition". If I right-click Goto
>>> Definition, it takes me to right where I am, no indication that there are
>>> multiple class definitions. I don't know where it's getting this from.
>>>
>>> I do believe this must be due to the DLL refereces though. And I think I
>>> might know why. We (for reasons unknown to me, but it's not changing)
>>> have two bin directories where DLLs are copied to... one for the
>>> application, and one for tests to run from. Don't ask why, I don't know.
>>> But I think maybe it's somehow seeing a reference to ABC.DLL in one of
>>> those directories as somehow different than a reference to the same
>>> ABC.DLL in the other directory. I say this because I'm only seeing the
>>> problem in my test projects, not any of the other ones.
>> Yes, you are absolutely correct in relating this to .dll references.
>> At the moment ReSharper adopts the following policy: If your project
>> references an assembly with short name identical to assembly output name
>> of one of your C# project, ReSharper happily assumes that you reference
>> that project.
>>
>> It will be of great help to us if you could provide a small solution with
>> a setup similar to what you have, that reproduces the problem.
>> So far I failed to reproduce it from your description. Will keep trying,
>> though.
>>
>>> What that doesn't explain, though, is why the class "Foo" in my TestSetup
>>> proejct is flagged as a duplicate. It's only declared in this one file,
>>> period... I have no idea what Resharper is looking at to think there is
>>> another copy of this class somewhere.
>> Does it happen occasionally or always? Does it go away after VS restart?
>> Does it go away after you clean ReSharper caches? It it only one class
>> that is reported as duplicated?
>>
>> Thanks in advance,
>> Friendly,
>> Dmitry
>> --
>> Dmitry Lomov
>> Senior Software Developer
>> JetBrains Inc.
>> http://www.jetbrains.com
>> "Develop With Pleasure!"




--
Dmitry Lomov
Senior Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop With Pleasure!"

0
Comment actions Permalink

TestSetupA is referened by TestA and TestB.

There are no project references anywhere in the solution. All references
are to DLL assemblies.


"Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in message
news:e2085t$2m6$1@is.intellij.net...

Paul,

>

I am afraid I still cannot reproduce this, even with your very elaborate
description...
Is TestASetup referenced only from TestA? Is there any project reference
to TestASetup somewhere?

>

Thanks in advance,
Friendly,
Dmitry
Paul Bradshaw wrote:

>>> Does it happen occasionally or always? Does it go away after VS restart?
>>> Does it go away after you clean ReSharper caches? It it only one class
>>> that is reported as duplicated?
>>
>> It happens always. Restarts and clearing caches doesn't help. It's
>> always exactly the same classes as well. Specifically, it is every
>> single class in two of my solutions 9 projects and 1 website. I swear I
>> can't see what makes these two projects so special at this point, but my
>> experience is much like Jeff's experience from what I can tell.
>> Actually, these two projects do stand out in that they're utility
>> projects meant to set up data in the database for use by the "Test"
>> projects. So let me break it down here:
>>
>> I have project A, B, C, and D that are part of my application. These
>> projects live in "C:\Myapp\A", "C:\Myapp\B", etc. The DLLs generated by
>> these projects are copied by a post-build step to two locations:
>> "C:\Myapp\bin" and "C:\Myapp\Test\bin". When these projects reference
>> each other, they do it with a DLL reference to the DLLs in C:\Myapp\Bin.
>>
>> There are two test projects, TestA, and TestB as well. They are also
>> copied to both locations, and live in the expected places. These tests
>> reference the A,B,C DLLs as DLL references in C:\Myapp\Bin.
>>
>> There are two additional test projects, TestASetup, and TestBSetup.
>> These projects live in a directory under the approprate Test* project
>> (i.e. C:\Myapp\TestA\TestASetup"). They reference the A, B, C, etc DLLs
>> from C:\Myapp\Test\Bin. These Test Setup projects are only referenced by
>> TestA and TestB... TestA references TestASetup as a DLL reference from
>> C:\MyApp\Test\Bin.
>>
>> Now, I see all classes and references in the original A, B, C projects
>> working just fine and as expected.
>>
>> I see all classes defined in TestASetup and TestBSetup as "Duplicate
>> Definition" for some reason.
>>
>> In the TestA and TestB projects, I see all references to methods defined
>> in TestASetup and/or TestBSetup as "ambigious", and attempting to Go To
>> Definition will show me two results: one which takes me to a class
>> browser, and one which takes me to the actual project source file.
>>
>> The project structure is odd, but it's been that way forever, and
>> Resharper 1.5 had no problems, and previous builds (I forget exactly
>> which numbers) of Resharper 2.0 didn't seem to exhibit this confusion.
>> There project compiles and builds fine.
>>
>> There's definitely something in common with the classes that exhibit the
>> problem, but I'm failing to see what the connection is, or what is
>> causing Resharper to become confused in the specific way it is... I wish
>> I had time to try and generate a small test solution that exhibited the
>> problem, but I'm honestly swamped at work and for now this is the best
>> that I can do. Please let me know if you need any more information, and
>> if I get some spare time down the road, I'll do my best to try and
>> duplicate the problem with a small solution starting from scratch (but
>> please don't count on that happening!)
>>
>>
>>
>>
>> "Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in message
>> news:e1o499$l3g$1@is.intellij.net...
>>> Paul,
>>>
>>> first off, thank you for the great feedback.
>>>
>>> I have a couple of questions inline.
>>> Paul Bradshaw wrote:
>>>> Much better than the previous build, but there's still a couple of
>>>> projects in my over-all solution where I'm getting bogus "Ambiguous
>>>> Reference" errors, and a bogus "Duplicate Definition" error on some
>>>> classes.
>>>>
>>>> If I position the cursor on the "Ambiguous Reference" error and Goto
>>>> Definition, it'll show two identical defitions for me to choose from
>>>> (no difference at all). If I click one, I'm taken to the object
>>>> browser, and if I click the other, I'm taken to the actual class. It's
>>>> this class that is flagged as "Duplicate Definition". If I right-click
>>>> Goto Definition, it takes me to right where I am, no indication that
>>>> there are multiple class definitions. I don't know where it's getting
>>>> this from.
>>>>
>>>> I do believe this must be due to the DLL refereces though. And I think
>>>> I might know why. We (for reasons unknown to me, but it's not
>>>> changing) have two bin directories where DLLs are copied to... one for
>>>> the application, and one for tests to run from. Don't ask why, I don't
>>>> know. But I think maybe it's somehow seeing a reference to ABC.DLL in
>>>> one of those directories as somehow different than a reference to the
>>>> same ABC.DLL in the other directory. I say this because I'm only
>>>> seeing the problem in my test projects, not any of the other ones.
>>> Yes, you are absolutely correct in relating this to .dll references.
>>> At the moment ReSharper adopts the following policy: If your project
>>> references an assembly with short name identical to assembly output name
>>> of one of your C# project, ReSharper happily assumes that you reference
>>> that project.
>>>
>>> It will be of great help to us if you could provide a small solution
>>> with a setup similar to what you have, that reproduces the problem.
>>> So far I failed to reproduce it from your description. Will keep trying,
>>> though.
>>>
>>>> What that doesn't explain, though, is why the class "Foo" in my
>>>> TestSetup proejct is flagged as a duplicate. It's only declared in
>>>> this one file, period... I have no idea what Resharper is looking at to
>>>> think there is another copy of this class somewhere.
>>> Does it happen occasionally or always? Does it go away after VS restart?
>>> Does it go away after you clean ReSharper caches? It it only one class
>>> that is reported as duplicated?
>>>
>>> Thanks in advance,
>>> Friendly,
>>> Dmitry
>>> --
>>> Dmitry Lomov
>>> Senior Software Developer
>>> JetBrains Inc.
>>> http://www.jetbrains.com
>>> "Develop With Pleasure!"
>>
>>
>
>

--
Dmitry Lomov
Senior Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop With Pleasure!"



0
Comment actions Permalink

Paul,

I still cannot reproduce this... Either I setup the solution wrongly, or
some configuration issue is overlooked in your description..
What would you say on the following suggestion: I send you a small
solution that I created trying to reproduce this, and you check whether
it is similar to your setup?

Thanks in advance,
Friendly,
Dmitry

Paul Bradshaw wrote:

TestSetupA is referened by TestA and TestB.

There are no project references anywhere in the solution. All references
are to DLL assemblies.


"Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in message
news:e2085t$2m6$1@is.intellij.net...

>> Paul,
>>
>> I am afraid I still cannot reproduce this, even with your very elaborate
>> description...
>> Is TestASetup referenced only from TestA? Is there any project reference
>> to TestASetup somewhere?
>>
>> Thanks in advance,
>> Friendly,
>> Dmitry
>> Paul Bradshaw wrote:
>>>> Does it happen occasionally or always? Does it go away after VS restart?
>>>> Does it go away after you clean ReSharper caches? It it only one class
>>>> that is reported as duplicated?
>>> It happens always. Restarts and clearing caches doesn't help. It's
>>> always exactly the same classes as well. Specifically, it is every
>>> single class in two of my solutions 9 projects and 1 website. I swear I
>>> can't see what makes these two projects so special at this point, but my
>>> experience is much like Jeff's experience from what I can tell.
>>> Actually, these two projects do stand out in that they're utility
>>> projects meant to set up data in the database for use by the "Test"
>>> projects. So let me break it down here:
>>>
>>> I have project A, B, C, and D that are part of my application. These
>>> projects live in "C:\Myapp\A", "C:\Myapp\B", etc. The DLLs generated by
>>> these projects are copied by a post-build step to two locations:
>>> "C:\Myapp\bin" and "C:\Myapp\Test\bin". When these projects reference
>>> each other, they do it with a DLL reference to the DLLs in C:\Myapp\Bin.
>>>
>>> There are two test projects, TestA, and TestB as well. They are also
>>> copied to both locations, and live in the expected places. These tests
>>> reference the A,B,C DLLs as DLL references in C:\Myapp\Bin.
>>>
>>> There are two additional test projects, TestASetup, and TestBSetup.
>>> These projects live in a directory under the approprate Test* project
>>> (i.e. C:\Myapp\TestA\TestASetup"). They reference the A, B, C, etc DLLs
>>> from C:\Myapp\Test\Bin. These Test Setup projects are only referenced by
>>> TestA and TestB... TestA references TestASetup as a DLL reference from
>>> C:\MyApp\Test\Bin.
>>>
>>> Now, I see all classes and references in the original A, B, C projects
>>> working just fine and as expected.
>>>
>>> I see all classes defined in TestASetup and TestBSetup as "Duplicate
>>> Definition" for some reason.
>>>
>>> In the TestA and TestB projects, I see all references to methods defined
>>> in TestASetup and/or TestBSetup as "ambigious", and attempting to Go To
>>> Definition will show me two results: one which takes me to a class
>>> browser, and one which takes me to the actual project source file.
>>>
>>> The project structure is odd, but it's been that way forever, and
>>> Resharper 1.5 had no problems, and previous builds (I forget exactly
>>> which numbers) of Resharper 2.0 didn't seem to exhibit this confusion.
>>> There project compiles and builds fine.
>>>
>>> There's definitely something in common with the classes that exhibit the
>>> problem, but I'm failing to see what the connection is, or what is
>>> causing Resharper to become confused in the specific way it is... I wish
>>> I had time to try and generate a small test solution that exhibited the
>>> problem, but I'm honestly swamped at work and for now this is the best
>>> that I can do. Please let me know if you need any more information, and
>>> if I get some spare time down the road, I'll do my best to try and
>>> duplicate the problem with a small solution starting from scratch (but
>>> please don't count on that happening!)
>>>
>>>
>>>
>>>
>>> "Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in message
>>> news:e1o499$l3g$1@is.intellij.net...
>>>> Paul,
>>>>
>>>> first off, thank you for the great feedback.
>>>>
>>>> I have a couple of questions inline.
>>>> Paul Bradshaw wrote:
>>>>> Much better than the previous build, but there's still a couple of
>>>>> projects in my over-all solution where I'm getting bogus "Ambiguous
>>>>> Reference" errors, and a bogus "Duplicate Definition" error on some
>>>>> classes.
>>>>>
>>>>> If I position the cursor on the "Ambiguous Reference" error and Goto
>>>>> Definition, it'll show two identical defitions for me to choose from
>>>>> (no difference at all). If I click one, I'm taken to the object
>>>>> browser, and if I click the other, I'm taken to the actual class. It's
>>>>> this class that is flagged as "Duplicate Definition". If I right-click
>>>>> Goto Definition, it takes me to right where I am, no indication that
>>>>> there are multiple class definitions. I don't know where it's getting
>>>>> this from.
>>>>>
>>>>> I do believe this must be due to the DLL refereces though. And I think
>>>>> I might know why. We (for reasons unknown to me, but it's not
>>>>> changing) have two bin directories where DLLs are copied to... one for
>>>>> the application, and one for tests to run from. Don't ask why, I don't
>>>>> know. But I think maybe it's somehow seeing a reference to ABC.DLL in
>>>>> one of those directories as somehow different than a reference to the
>>>>> same ABC.DLL in the other directory. I say this because I'm only
>>>>> seeing the problem in my test projects, not any of the other ones.
>>>> Yes, you are absolutely correct in relating this to .dll references.
>>>> At the moment ReSharper adopts the following policy: If your project
>>>> references an assembly with short name identical to assembly output name
>>>> of one of your C# project, ReSharper happily assumes that you reference
>>>> that project.
>>>>
>>>> It will be of great help to us if you could provide a small solution
>>>> with a setup similar to what you have, that reproduces the problem.
>>>> So far I failed to reproduce it from your description. Will keep trying,
>>>> though.
>>>>
>>>>> What that doesn't explain, though, is why the class "Foo" in my
>>>>> TestSetup proejct is flagged as a duplicate. It's only declared in
>>>>> this one file, period... I have no idea what Resharper is looking at to
>>>>> think there is another copy of this class somewhere.
>>>> Does it happen occasionally or always? Does it go away after VS restart?
>>>> Does it go away after you clean ReSharper caches? It it only one class
>>>> that is reported as duplicated?
>>>>
>>>> Thanks in advance,
>>>> Friendly,
>>>> Dmitry
>>>> --
>>>> Dmitry Lomov
>>>> Senior Software Developer
>>>> JetBrains Inc.
>>>> http://www.jetbrains.com
>>>> "Develop With Pleasure!"
>>>
>>
>> --
>> Dmitry Lomov
>> Senior Software Developer
>> JetBrains Inc.
>> http://www.jetbrains.com
>> "Develop With Pleasure!"




--
Dmitry Lomov
Senior Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop With Pleasure!"

0
Comment actions Permalink

Dmitry,

I set up a small windows solution that reproduces this behavior. I have attached the solution and all the supporting files. If you open Program.cs in the WindowsApplication you should receive the 'ambiguous reference' problem. I did not receive this while initially setting up the references, but after I shut down Visual Studio 2005 and restarted it, the warnings started.

Thanks,
Dan



Attachment(s):
WindowsApplication2.zip
0
Comment actions Permalink

You can certainly do that if Dan's solution doesn't help you, but I really
am swamped this week, and next week I'm out on vacation... I'm just not
getting any time to spend on this :( Sorry! I will do what I can, though
if you send a solution, but unfortunately I can't make any promises right
now...


"Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in message
news:e2530j$6lh$1@is.intellij.net...

Paul,

>

I still cannot reproduce this... Either I setup the solution wrongly, or
some configuration issue is overlooked in your description..
What would you say on the following suggestion: I send you a small
solution that I created trying to reproduce this, and you check whether it
is similar to your setup?

>

Thanks in advance,
Friendly,
Dmitry

>

Paul Bradshaw wrote:

>> TestSetupA is referened by TestA and TestB.
>>
>> There are no project references anywhere in the solution. All references
>> are to DLL assemblies.
>>
>>
>> "Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in message
>> news:e2085t$2m6$1@is.intellij.net...
>>> Paul,
>>>
>>> I am afraid I still cannot reproduce this, even with your very elaborate
>>> description...
>>> Is TestASetup referenced only from TestA? Is there any project
>>> reference to TestASetup somewhere?
>>>
>>> Thanks in advance,
>>> Friendly,
>>> Dmitry
>>> Paul Bradshaw wrote:
>>>>> Does it happen occasionally or always? Does it go away after VS
>>>>> restart?
>>>>> Does it go away after you clean ReSharper caches? It it only one class
>>>>> that is reported as duplicated?
>>>> It happens always. Restarts and clearing caches doesn't help. It's
>>>> always exactly the same classes as well. Specifically, it is every
>>>> single class in two of my solutions 9 projects and 1 website. I swear
>>>> I can't see what makes these two projects so special at this point, but
>>>> my experience is much like Jeff's experience from what I can tell.
>>>> Actually, these two projects do stand out in that they're utility
>>>> projects meant to set up data in the database for use by the "Test"
>>>> projects. So let me break it down here:
>>>>
>>>> I have project A, B, C, and D that are part of my application. These
>>>> projects live in "C:\Myapp\A", "C:\Myapp\B", etc. The DLLs generated
>>>> by these projects are copied by a post-build step to two locations:
>>>> "C:\Myapp\bin" and "C:\Myapp\Test\bin". When these projects reference
>>>> each other, they do it with a DLL reference to the DLLs in
>>>> C:\Myapp\Bin.
>>>>
>>>> There are two test projects, TestA, and TestB as well. They are also
>>>> copied to both locations, and live in the expected places. These tests
>>>> reference the A,B,C DLLs as DLL references in C:\Myapp\Bin.
>>>>
>>>> There are two additional test projects, TestASetup, and TestBSetup.
>>>> These projects live in a directory under the approprate Test* project
>>>> (i.e. C:\Myapp\TestA\TestASetup"). They reference the A, B, C, etc
>>>> DLLs from C:\Myapp\Test\Bin. These Test Setup projects are only
>>>> referenced by TestA and TestB... TestA references TestASetup as a DLL
>>>> reference from C:\MyApp\Test\Bin.
>>>>
>>>> Now, I see all classes and references in the original A, B, C projects
>>>> working just fine and as expected.
>>>>
>>>> I see all classes defined in TestASetup and TestBSetup as "Duplicate
>>>> Definition" for some reason.
>>>>
>>>> In the TestA and TestB projects, I see all references to methods
>>>> defined in TestASetup and/or TestBSetup as "ambigious", and attempting
>>>> to Go To Definition will show me two results: one which takes me to a
>>>> class browser, and one which takes me to the actual project source
>>>> file.
>>>>
>>>> The project structure is odd, but it's been that way forever, and
>>>> Resharper 1.5 had no problems, and previous builds (I forget exactly
>>>> which numbers) of Resharper 2.0 didn't seem to exhibit this confusion.
>>>> There project compiles and builds fine.
>>>>
>>>> There's definitely something in common with the classes that exhibit
>>>> the problem, but I'm failing to see what the connection is, or what is
>>>> causing Resharper to become confused in the specific way it is... I
>>>> wish I had time to try and generate a small test solution that
>>>> exhibited the problem, but I'm honestly swamped at work and for now
>>>> this is the best that I can do. Please let me know if you need any more
>>>> information, and if I get some spare time down the road, I'll do my
>>>> best to try and duplicate the problem with a small solution starting
>>>> from scratch (but please don't count on that happening!)
>>>>
>>>>
>>>>
>>>>
>>>> "Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in
>>>> message news:e1o499$l3g$1@is.intellij.net...
>>>>> Paul,
>>>>>
>>>>> first off, thank you for the great feedback.
>>>>>
>>>>> I have a couple of questions inline.
>>>>> Paul Bradshaw wrote:
>>>>>> Much better than the previous build, but there's still a couple of
>>>>>> projects in my over-all solution where I'm getting bogus "Ambiguous
>>>>>> Reference" errors, and a bogus "Duplicate Definition" error on some
>>>>>> classes.
>>>>>>
>>>>>> If I position the cursor on the "Ambiguous Reference" error and Goto
>>>>>> Definition, it'll show two identical defitions for me to choose from
>>>>>> (no difference at all). If I click one, I'm taken to the object
>>>>>> browser, and if I click the other, I'm taken to the actual class.
>>>>>> It's this class that is flagged as "Duplicate Definition". If I
>>>>>> right-click Goto Definition, it takes me to right where I am, no
>>>>>> indication that there are multiple class definitions. I don't know
>>>>>> where it's getting this from.
>>>>>>
>>>>>> I do believe this must be due to the DLL refereces though. And I
>>>>>> think I might know why. We (for reasons unknown to me, but it's not
>>>>>> changing) have two bin directories where DLLs are copied to... one
>>>>>> for the application, and one for tests to run from. Don't ask why, I
>>>>>> don't know. But I think maybe it's somehow seeing a reference to
>>>>>> ABC.DLL in one of those directories as somehow different than a
>>>>>> reference to the same ABC.DLL in the other directory. I say this
>>>>>> because I'm only seeing the problem in my test projects, not any of
>>>>>> the other ones.
>>>>> Yes, you are absolutely correct in relating this to .dll references.
>>>>> At the moment ReSharper adopts the following policy: If your project
>>>>> references an assembly with short name identical to assembly output
>>>>> name of one of your C# project, ReSharper happily assumes that you
>>>>> reference that project.
>>>>>
>>>>> It will be of great help to us if you could provide a small solution
>>>>> with a setup similar to what you have, that reproduces the problem.
>>>>> So far I failed to reproduce it from your description. Will keep
>>>>> trying, though.
>>>>>
>>>>>> What that doesn't explain, though, is why the class "Foo" in my
>>>>>> TestSetup proejct is flagged as a duplicate. It's only declared in
>>>>>> this one file, period... I have no idea what Resharper is looking at
>>>>>> to think there is another copy of this class somewhere.
>>>>> Does it happen occasionally or always? Does it go away after VS
>>>>> restart?
>>>>> Does it go away after you clean ReSharper caches? It it only one class
>>>>> that is reported as duplicated?
>>>>>
>>>>> Thanks in advance,
>>>>> Friendly,
>>>>> Dmitry
>>>>> --
>>>>> Dmitry Lomov
>>>>> Senior Software Developer
>>>>> JetBrains Inc.
>>>>> http://www.jetbrains.com
>>>>> "Develop With Pleasure!"
>>>>
>>>
>>> --
>>> Dmitry Lomov
>>> Senior Software Developer
>>> JetBrains Inc.
>>> http://www.jetbrains.com
>>> "Develop With Pleasure!"
>>
>>
>
>

--
Dmitry Lomov
Senior Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop With Pleasure!"



0
Comment actions Permalink

Dan,

apparently attachments do not work in tracker at the moment.
I'll be much obliged if you send your solution to me via e-mail
dmitry.lomov-at-jetbrains.com.

Thanks in advance,
Friendly,
Dmitry

Dan Smeltz wrote:

Dmitry,

I set up a small windows solution that reproduces this behavior. I have attached the solution and all the supporting files. If you open Program.cs in the WindowsApplication you should receive the 'ambiguous reference' problem. I did not receive this while initially setting up the references, but after I shut down Visual Studio 2005 and restarted it, the warnings started.

Thanks,
Dan



--
Dmitry Lomov
Senior Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop With Pleasure!"

0
Comment actions Permalink

Oops, never mind...
I have found the attached file.. Apparently attachments work in forums...
Will check shortly...

D.

Dmitry Lomov (JetBrains) wrote:

Dan,

apparently attachments do not work in tracker at the moment.
I'll be much obliged if you send your solution to me via e-mail
dmitry.lomov-at-jetbrains.com.

Thanks in advance,
Friendly,
Dmitry

Dan Smeltz wrote:

>> Dmitry,
>>
>> I set up a small windows solution that reproduces this behavior. I
>> have attached the solution and all the supporting files. If you open
>> Program.cs in the WindowsApplication you should receive the 'ambiguous
>> reference' problem. I did not receive this while initially setting up
>> the references, but after I shut down Visual Studio 2005 and restarted
>> it, the warnings started.
>>
>> Thanks,
>> Dan




--
Dmitry Lomov
Senior Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop With Pleasure!"

0
Comment actions Permalink

Dan,
thank you, problem reproduced on your solution.
I've opened a stopship request on this problem.
http://www.intellij.net/tracker/resharper/viewSCR?publicId=23106
You can watch it to see when it gets fixed.

Apparently the problem is related to the order in which projects are
added to solution, that is why we could not reproduce this easily.

Thank you very much!

Cheers,
Dmitry

Dan Smeltz wrote:

Dmitry,

I set up a small windows solution that reproduces this behavior. I have attached the solution and all the supporting files. If you open Program.cs in the WindowsApplication you should receive the 'ambiguous reference' problem. I did not receive this while initially setting up the references, but after I shut down Visual Studio 2005 and restarted it, the warnings started.

Thanks,
Dan



--
Dmitry Lomov
Senior Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop With Pleasure!"

0
Comment actions Permalink

Glad to hear you've reproduced it (with Dan's help)!! Sorry I wasn't able
to be more help...

"Dmitry Lomov (JetBrains)" <dmitry.lomov@jetbrains.com> wrote in message
news:e25qbg$9oc$1@is.intellij.net...

Dan,
thank you, problem reproduced on your solution.
I've opened a stopship request on this problem.
http://www.intellij.net/tracker/resharper/viewSCR?publicId=23106
You can watch it to see when it gets fixed.

>

Apparently the problem is related to the order in which projects are added
to solution, that is why we could not reproduce this easily.

>

Thank you very much

>

Cheers,
Dmitry

>

Dan Smeltz wrote:

>> Dmitry,
>>
>> I set up a small windows solution that reproduces this behavior. I have
>> attached the solution and all the supporting files. If you open
>> Program.cs in the WindowsApplication you should receive the 'ambiguous
>> reference' problem. I did not receive this while initially setting up
>> the references, but after I shut down Visual Studio 2005 and restarted
>> it, the warnings started.
>>
>> Thanks,
>> Dan
>
>

--
Dmitry Lomov
Senior Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop With Pleasure!"



0
Comment actions Permalink

There is still an issue with this in 240. I have attached a project that demonstrates the odd behavior. I believe the solution should have 3 projects when you initially open it. All references between projects are file references. Compile the solution and then remove the XYZ project. You see some ambiguity warnings show up in the Program.cs file of the WindowsApplication project. If you then remove the Enum project, you'll get a green light.



Attachment(s):
WindowsApplication2.zip
0

Please sign in to leave a comment.