Resharper 6 - Ambiguous reference

Hi.

I have been using Resharper Build 6.0.2202.688 in VS 2010 Version 10.0.40219.1 SP1Rel for a while now, but suddenly yesterday it started to mark all my Strongly Typed DataSet as Ambiguous reference.
They are all marked red and even worse - there is no Intellisense on them.
I saw that the reference was to ASP.NET temporary files so I quit VS, deleted them and everything was fine except that VS was very slow and Resharper was analyzing files. As soon as it finished analyzing all the errors was back.
I have tried to Clear Cache and restarted VS, but no good.
I have to deliver a project in two days so this is a bit of a crisis!

Any advice?

Addition info: Turning off code analysis and giving Intellisens back to VS solved the problem for now, but the the point of resharper is gone!

Message was edited by: Espen Fosshaug

17 comments

Hello Espen,

Could you please create a small sample solution (by removing files and projects
from the original solution while keeping this problem reproducible) and attach
it here (or send it to andrew dot serebryansky at jetbrains dot com)? Thank
you!

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

Hi.

I have been using Resharper Build 6.0.2202.688  for a while now, but
suddenly yesterday it started to mark all my Strongly Typed DataSet as
Ambiguous reference.

They are all marked red and even worse - there is no Intellisense on
them.

I saw that the reference was to ASP.NET temporary files so I quit VS,
deleted them and everything was fine except that VS was very slow and
Resharper was analyzing files. As soon as it finished analyzing all
the errors was back.

I have tried to Clear Cache and restarted VS, but no good.

I have to deliver a project in two days so this is a bit of a crisis!

Any advice?

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



0

Maybe later. Do not have time to do this now.
Have uninstalled resharper to be able to use VS at all.

0

Hi.

Had some sparetime, and reinstalled ReSharper 6 now. The error is still there. On all Strongly Typed DataSet i get Ambigious reference between tow classes that looks alike. This happens after Resharper has processed source files. Works fine until that is finished.
Attached screenshot to show the error.

It is not easy to create a demo for this since it happens on the the link to the database and you would need the database as well - or it will fail because the data is not found.

Is there any way you can look at this without a project? The problem is clearly between the solution and the procesessed files.
Image resharp5.png shows what happens when I press F12 on the proc. It is found in two locations. When I uninstall resharper this is no longer happening.
I have tried to change Cache between Temp folder and Solution folder. Changed IntelliSense between reharper and VS.
None of this helps. The only way I can work is by uninstalling Resharper - and i loved it while it worked.


Looks like i found the solution while writing this e-mail. This is a WebSite where the code is in the WebSites folder. I now deleted the folder for the soultion under Projects and reopened the website from VS so the folder was regenerated. It now looks liek it is working again.
Will post an update when I know for sure.

Espen



Attachment(s):
resharp5.PNG
resharp4.PNG
resharp2.PNG
resharp1.PNG
0

I seem to have a similar issue in an ASP.MVC 2 project. (I'm using Resharper Full Edition build 6.0.2202.688 & VS 10.0.40219.1 SP1Rel)

I've been able to reproduce the issue by creating an ASP.NET MVC 2 project that targets .Net 3.5.

If you then change the Build Output Path for to ..\bin\ and rebuild you then start getting this issue.

I hope this information is helpful in finding a solution or work around. Let me know if you need any more details.

Thanks,
Matt

PS - and this obviously means that a workaround is to change the build path back to bin\



Attachment(s):
ReSharperAmbigRef.png
0

Hello Matt,

I'm afraid I wasn't able to reproduce this behavior following the steps you've
provided. Could you please attach the solution that exhibits this behavior
here? Thank you!

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

I seem to have a similar issue in an ASP.MVC 2 project. (I'm using
Resharper Full Edition build 6.0.2202.688 & VS 10.0.40219.1 SP1Rel)

I've been able to reproduce the issue by creating an ASP.NET MVC 2
project that targets .Net 3.5.

If you then change the Build Output Path for to ..\bin\ and rebuild
you then start getting this issue.

I hope this information is helpful in finding a solution or work
around. Let me know if you need any more details.

Thanks,
Matt
---
Original message URL:
http://devnet.jetbrains.net/message/5328172#5328172



0

I've experienced these issues when having "Mixed platforms" solution configuration set by accident. We normally use "Any CPU" and if one adds a new project which implicitly selects the "Mixed platform" to the active solution configuration, I noticed I started to get a lot of those ambiguous errors from RS. Switching back to "Any CPU" resolved it for me.

0

Hi Andrey,

A zip of the solution is attached.

Thanks,
Matt



Attachment(s):
MvcApplication4.zip
0

I'm having the same issue with my asp.net solution; I have 242 files with ambiguous references - all of them are in the website project and all refer to classes in my assemblies in referenced projects.

I saw a suggestion about setting the properties on the assemblies' reference projects to Copy Local = false. And I've also cleared the cache.

The huge amount of error is making resharper unusable for this solution.

I have the latest C# version installed (6.0.2202.688).

Dave.

0

I had the same problem in solution with many referenced projects. Recently we have renamed one of those reference projects so we had different name of the DLL file. After a while, resharper started to create this kind of problem, but when I deleted all the old DLL files from BIN folders, it worked.

0

Hi Andrey,

Did that zip help you reproduce the issue?

Thanks,
Matt

0

I've been having much the same issue on and off for a while now. Yesterday
for example I was working with an ASP.NET project and everything seemed to
be fine. After making some changes to the code (with no errors highlighted
anywhere) I compiled the solution. Immediately after Visual Studio 2010
reported build successful, ReSharper marked 250+ files with ambiguous
reference errors.

My best guess is that it's related to external files being changed on disk
because I notice the same thing often happens when I do a Get Latest from
Vault client, svn/TortoiseSVN update, hg/TortoiseHG update, or
git/TortoiseGit pull. Most of the time I can open each file and wait for the
live code analysis to clear the errors, but on occasion I have to close
Visual Studio, delete ReSharper's cache, and restart.

There may also be some locking issues between live code analysis and
solution-wide code analysis. I've noticed on occasion when this happens that
live code analysis seemingly runs indefinitely (blinking the yellow box at
the top right corner). When this happens I also see that solution-wide code
analysis isn't running -- it's sitting on say 12 of 242 but doesn't update.
When that happens, I can pause solution-wide code analysis and live code
analysis will immediately complete. I can then restart solution-wide code
analysis and it'll continue until the next hang. I haven't been able to
reproduce this when I have dotTrace running yet, so I don't have a
performance snapshot for you yet.

"Espen Fosshaug"  wrote in message
news:9672431.144331316686925045.JavaMail.devnet@confluence.jetbrains.net...

Hi.

I have been using Resharper Build 6.0.2202.688  for a while now, but
suddenly yesterday it started to mark all my Strongly Typed DataSet as
Ambiguous reference.
They are all marked red and even worse - there is no Intellisense on them.
I saw that the reference was to ASP.NET temporary files so I quit VS,
deleted them and everything was fine except that VS was very slow and
Resharper was analyzing files. As soon as it finished analyzing all the
errors was back.
I have tried to Clear Cache and restarted VS, but no good.
I have to deliver a project in two days so this is a bit of a crisis!

Any advice?

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

0

I added a screenshot to RSRP-284141 (duplicated below) that shows ReSharper 6.1 highlighing an ambiguous invocation error. In this case ReSharper considers log4net.ILog.GetLogger(string) and log4net.ILog.GetLogger(System.Type) to both be a match for LogManager.GetLogger(typeof(foo)). The one clue I have is that the code analsysis was fine until I compiled the solution. Immediately after compiling, ReSharper highlighted the statement with an ambiguous invocation error. A couple of hours later, ReSharper highlighted 25 source files out of the blue with various errors.

Usually I can open a source file that ReSharper thinks contains an error and the live code analysis clears the errors away. This wasn't the case today. I had to close and restart Visual Studio 2010 to get ReSharper to reanlyze the files to clear the errors. Even stranger is that after I restarted Visual Studio 2010 and opened the solution, ReSharper began analyzing 724 files even though only half a dozen files had any changes and it stopped with a green bulb after analyzing 250 or so of these files. It was strange. It got right around 250 of 700 just stopped giving me a green light.

Ambiguous invocation.png

0

We are just considering purchase several more licences for a new ASP.Net project but I'm holding fire for a while since this issue has been going on since September and there appears to be a lack of response from JetBrains.

0

I fixed this problem by deleting the bin and obj folders in Windows Explorer. I found that the Clean command in Visual studio doesn't delete all the dll's. If you do a Clean, then search for *.dll, and you can find where old libraries are lingering.

0

I've noticed the same issue. How ever I have the options setup it doesn't cause any errors, just annoying.  I also noticed a dramatic decrease in performance when changing the configuration to x86. Not sure if they are related, but by others posts looks like it might be.

0

Invoking 'Build | Clean Solution' followed by 'Build | Rebuild Solution' fixed this issue for me.  Visual Studio 2013.

0

Once this is encountered on any of my computers using any version of Reshaper released in the last 3 years and works 100% of the time is deleting "%LOCALAPPDATA%\JetBrains" and reinstall ReSharper. This has been an issue for years and I'm surprised this is still a thing. 

0

Please sign in to leave a comment.