Resharper: Cannot resolve symbol 'Eval' in VS2010 SP1

主宰稳场 提交于 2019-12-28 16:50:44

问题


I just installed SP1 for VS2010, and since then I get error messages from Resharper for stuff that used to work and be ok for Resharper (5.1) before.

The error messages are "Cannot resolve symbol 'Eval'" and some other methods other than Eval.

How do I solve this? Is there a fix? Is there some resharper cache that I must delete/clear?

(The code compiles and runs as usual)


回答1:


I would try deleting the _ReSharper.{SolutionName} directory completely if clear cache fails.

You might want to close VS2010 before you do that.

EDIT: Try this only if @Andrew Finnell solution doesn't work.




回答2:


Try:

Resharper Menu -> Options -> General -> Clear Cache button



回答3:


I had this problem in spades in my multi-project VS solution. Tried Julien + Andrew's solutions and they did not resolve the issue. But everything compiled just fine and worked as normal -- it was simply the "Errors in Solution" that kept showing the errors (which also showed up when you looked at the code in the right-hand-ReSharper-margin).

It turns out I had inadvertently deleted the web.config file in one of the solution's web projects during some version control operations. Who knew that thing was important?

I restored the web.config file, cleared the cache and deleted the R# cache directories and then rebuilt all of the projects individually and the issues went away.

Phew!




回答4:


The solutions of @Andrew Finnell and @Julien Bérubé, alone and combined, did not fix my problem of "Cannot resolve symbol".

The comment of @bdwakefield pointing to here finally shed light on my problem.

It turns out that my "not resolved symbol" contains a web reference, and ReSharper gets lost there somehow.

By the link above it is possible to see that this is also an issue for many people, but JetBrains guys were not able to reproduce the error until now (see here).




回答5:


I was having the same problem with one of my projects. I reported the issue to JetBrains and they requested a VS solution which has the problem.

So, I decided to spend a few hours trying to narrow down the problem as much as possible. I found out that the issue is related to a tool I use which strips out information from .DLLs.

If I don’t strip the .DLLs, Resharper works fine without showing any “cannot resolve symbol” errors. However, If I do strip the .dll, then ReSharper starts to show these “cannot resolve symbol” errors. In both cases, Visual Studio compiles the program and the program runs fine.

I am working with JetBrains to get the issue resolved.

In the mean time, I am able to workaround the problem by using versions of my .DLLs which do not have any information stripped out of them.



来源:https://stackoverflow.com/questions/5539131/resharper-cannot-resolve-symbol-eval-in-vs2010-sp1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!