ReSharper “Cannot resolve symbol” even when projec

2019-01-03 07:25发布

My Tools:

Visual Studio 2012 Ultimate + Update 1

ReSharper v7.1.25.234

My Solution Build Status: Build Successfully

But when I install ReSharper and ReSharper code analysis is enable, many keywords of my code are red with this error:

"Cannot resolve symbol XXX"

Enter image description here


Another picture of my project >>

The ReSharper “CANNOT RESOLVE SYMBOL” errors are everywhere, but my project build process is successfully, and it works correctly.

Enter image description here

Additional Note: If I disable ReSharper Code Analysis, my project will be Normal, but I want to use ReSharper code analysis.


I tried ReSharper → OptionsGeneralClear Cache. But I still have this problem!


  • One month ago, I got these errors when I uninstalled Visual Studio 2012 RC and installed VS 2012 RTM.

  • I've already uninstalled and installed ReSharper again. But I have this problem yet!

  • My solution has five projects >> two loaded projects (main project + resource project) and three unloaded projects


I realize that my Visual Studio also has bigger problems (More information on Stack Overflow)

  • I can't add any reference to my projects (even inside new solutions and new projects)

  • I can't install any package (by "Packet Manager Console" or Manage NuGet Package)

  • I can't update any package (by "Packet Manager Console" or Manage NuGet Package)

I've done a lot of suggestions (of myself and others)

  • Re-resister some DLL files

  • Using some windows and registry repair tools

  • Remove ReSharper

  • Repair Visual Studio

  • and...

But I could not solve it.

I'm thinking of installing a new Windows :(


What is wrong, and how can I fix it?

30条回答
疯言疯语
2楼-- · 2019-01-03 08:13

What helped in my case after several of the suggestions above didn't:

  • Removed one project reference (of one of the libraries where ReSharper claimed not to be able to find it even though it was correctly referenced).
  • Use ReSharper’s "Resolve" on one of its usages to add the reference again.

After that, it worked fine, even though none of the project files were actually modified in the process.

查看更多
对你真心纯属浪费
3楼-- · 2019-01-03 08:14
VS -> Tools -> Options -> ReSharper Suspend button 
Clear Contents of -> AppData\Local\JetBrains\ReSharper\v7.1\SolutionCaches
VS -> Tools -> Options -> ReSharper Resume  button
查看更多
SAY GOODBYE
4楼-- · 2019-01-03 08:14

I had similar problems and cleared the caches found at:

AppData\Local\JetBrains\ReSharper\v7.1\SolutionCaches

Solved the problems for me

Running VS2012 u3

查看更多
成全新的幸福
5楼-- · 2019-01-03 08:14

No soft caches removal solutions worked for me, it looks like there were issues generated between different RS versions installed over the years.

What worked for me was:

  • Uninstal resharper
  • remove all JetBrains folders within AppData\Local and AppData\Roaming
  • Install resharper again

All the settings need to be redone, etc but I couldnt get any better solution even with help of JetBrains team.

查看更多
Rolldiameter
6楼-- · 2019-01-03 08:14

I just want to report my solution in case anyone has the similar situation as I do. I have Visual Studio 2013 with update 5 and ReSharper 8.2.3. My project is ASP.NET MVC 5.

Normally, I'm good at keep updating my extension packages. Just recently, I found out all my views are red and showing "cannot resolve view xxxx". I tried the clear cache and suspend ReSharper and resume ReSharper solution, but the error will come back once I build the project.

I checked my ReSharper extensions, and then I uninstalled the resharper.ExternalAnnotations package (8.2.3005) and re-install the previous version from gallery (8.2.3000.5176). This seems to have fixed my problem.

查看更多
迷人小祖宗
7楼-- · 2019-01-03 08:15

It's usually happen by config file corrupt or wrong detect. Just delete .vs folder, restart VS to reset config. It will work almost case

enter image description here

查看更多
登录 后发表回答