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:06

As you see the Solution is What everyone has already mentioned above. Simply by Suspending the Resharper then Clearing the Caches and finally Resuming it. But, no one mentioned how to do it Without closing/restarting VisualStudio.

Just Follow these Steps:

  1. Getting Resharper Cache Location

    • Manually by Going to Resharper Options > Environment > General > Store Solution Catches In(Combo Box)(Marked 2 in the Image). Selecting Custom Folder, Then Copying the location of the Catches Folder from the shown text box (Marked 3 in the Image). Reverting the settings back. The 1 Marked shows the ClearCache Button. It's Usually wouldn't work so leave it. Image showing the stuff
  2. Suspending Resharper
    • You can do this by going to Tools > Options > Resharper Or Resharper Ultimate > Suspend Now (Button) Resharper Suspend Option
  3. Clearing the Cache

    • Goto the location copied earlier in step 1 and delete every thing in that folder. And yes, I do mean everything.
  4. Resuming Resharper

    • You can do this by again going to Tools > Options > Resharper Or Resharper Ultimate > Resume (Button)
查看更多
地球回转人心会变
3楼-- · 2019-01-03 08:07

I my case, I tried all the suggestions above. But, at some point I realized that the problem persists even if Resharper is suspended. So, I looked for similar problem in VS itself and found the solution in the comments for the accepted answer in this SO post.

I'm listing my steps for brevity.

  1. VS -> Tools -> Options -> ReSharper Suspend button
  2. Build solution. Notice all references still unresolved
  3. Clean the solution
  4. Restart VS
  5. Build the solution without Resharper. Notice all references resolved
  6. VS -> Tools -> Options -> ReSharper Resume button
查看更多
做自己的国王
4楼-- · 2019-01-03 08:10

This was happening to me with Visual Studio 2015 and ReSharper Ultimate 10.0.2. I tried pretty much all the solutions above (apart from any reinstallations) and nothing worked.

I got it working again with a variety of the above steps in a very specific order:

  1. ReSharper → Options → Environment → General → Clear Caches
    • this must be done before suspending ReSharper as otherwise this option is unavailable
    • this clears out the files in C:\Users\YourUsername\AppData\Local\JetBrains\Transient\ReSharperPlatformVs14\v04 as mentioned in some other posts
  2. Tools → Options → ReSharper Ultimate → Suspend
  3. Close Visual Studio
    • this actually performs the ReSharper cache clear
  4. Open Visual Studio
  5. Open the solution
    • I waited for Visual Studio to detect there were no code issues in IntelliSense and may have performed a build at this point.
  6. Tools → Options → ReSharper Ultimate → Resume

Hopefully after the last step you can breathe a sigh of relief that you don't have to reinstall anything, I certainly did!

查看更多
对你真心纯属浪费
5楼-- · 2019-01-03 08:11

For me, inspecting the solution gave me hundreds of errors, including many "cannot find file in search paths". I tried every suggestion out there to fix it and none of them worked. I ended up finding out inspecting the project, instead of the solution, worked perfectly.

查看更多
一夜七次
6楼-- · 2019-01-03 08:12

This worked for me (VS2012u4, R# 7.1.3):

  1. Resharper > Options > Environment: General > Clear Caches
  2. Restart Visual Studio
查看更多
Evening l夕情丶
7楼-- · 2019-01-03 08:13

I had the same issue and unloading and reloading problematic project helped me to clear out this issue for ReSharper. Hope this helps.

查看更多
登录 后发表回答