538

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?

SharpC
  • 6,974
  • 4
  • 45
  • 40
Ramin Bateni
  • 16,499
  • 9
  • 69
  • 98
  • 4
    I had the same issue once. Had to unistall it and install it again. – MeTitus Mar 29 '13 at 23:54
  • @Marco, I've already uninstalled and installed it again. But has not solved. – Ramin Bateni Mar 30 '13 at 06:52
  • It's because of Automapper red, you should check it out – hackp0int Mar 30 '13 at 07:01
  • @IamStalker Automapper is Red,ModelStat is Red, Authorize is Red, HttpPost is Red and.... But my project build successfully. it is a problem of Resharper to detect some classes (include some Asp.net mvc classes). My Automapper work correctly... it is not my problem. – Ramin Bateni Mar 30 '13 at 07:55
  • Thanks of All.. But unfortunately, none of the answers did not solve my problem. I was forced to reinstall my OS... – Ramin Bateni Sep 12 '14 at 10:37
  • 3
    Any of the solutions below will work, temporarily. The problem always comes back and is especially bad if you're also using TFS for version control. Silence from JetBrains and lack of updates in the past year makes me think they are lazily riding the R# money train. – Yuck Oct 16 '14 at 16:28
  • 3
    In my case, none of the answers here have worked. I've also gone through Jetbrain's support but they haven't been able to help as yet. I've simply had to disable Resharper for the time being. [Issue tracked here](https://youtrack.jetbrains.com/issue/RSRP-463041). – Co7e Feb 17 '17 at 15:20
  • Also check you are not missing the relevant .dll in your references. – arush436 Sep 11 '17 at 12:41
  • Just my two cents: I have this problem in several solutions (with resharper caches per solution, not globally). It even happens that language constants such as vbCrLf are flagged as "undefined" in one file, and are OK in another file in the same project. But I've noticed that it only occurs in solutions that contain projects in different languages (Vb.Net and C# projects in the same solution). Clearing the cache or deleting the .vs folder at the solution root helps temporarily, but the problem always returns after a while. Porting all old Vb.Net code to C# helps better. at a cost of time. – Luc VdV Sep 16 '19 at 13:49
  • 1
    It's Jan 2021 and this problem still exists! =| – Andreas Jan 22 '21 at 08:06
  • Unload project and reload project, before you do this suspend resharper to see if vs can find what it needs to, if it can resume resharper then unload/reload. – joe blogs Jul 25 '21 at 05:35
  • I've raised an issue [here](https://youtrack.jetbrains.com/issue/RSRP-489188) as this is still not resolved in July 2022. – Neo Jul 11 '22 at 23:20

42 Answers42

797

Try Visual Studio → menu ToolsOptionsReSharper, Suspend button and Resume again (no need to close the window). This works in my case.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ilya Serbis
  • 21,149
  • 6
  • 87
  • 74
  • 4
    On VS2012 Update 3 with Resharper 7.1.3 and this didn't resolve my issue. Uninstalling Resharper and reinstalling fixed it for me. – LordHits Oct 02 '13 at 16:59
  • 103
    This didn't work for me but clearing ReSharper Caches solved the problem. – quadroid Oct 31 '13 at 17:02
  • 18
    I had to clear cache and suspend ReSharper VS2012 update 4 and R# 7.1 – moi_meme Nov 27 '13 at 16:27
  • 22
    This didn't work for me either, but unloading/reloading the project did: right-click the project->Unload Project, then right-click again->Reload Project. – biscuit314 Sep 10 '14 at 13:03
  • 7
    Same solution with clear cache (necessary in some cases): http://stackoverflow.com/a/19772172/2387977 – Dherik Dec 11 '14 at 13:32
  • 1
    Did not work at first. Then I realized I had two VS instances open. Once I closed the second instance, suspend/resume worked. – Pierre-Luc Pineault Feb 21 '15 at 05:32
  • 1
    1. Cleared ReSharper cache via ReShaper menu. 2. Suspends ReSharper. 3. Resume ReSharper fixed it for me. I did this after repairing VS2013 update 4. – Kentative Oct 20 '15 at 20:46
  • I just turned off ReSharper, I think I prefer not using it unfortunately =/ But this answer did it for me! I just never un-suspended it lol. I also think ReSharper is my problem with VS trying to write my code for me (putting in automatic braces and crap I don't want) I'm an artist, Da Vinci didnt have random paint brushes flying in and completing his strokes for him!!! – Josh Feb 02 '17 at 13:32
  • The only thing that worked for me was cleaning the solution, closing visual studio, deleting the .suo files under the solution's .vs/{solution_name}/v15 folder. I did not have to suspend resharper, but cleaning along didn't work, rebuilding alone didn't work, restarting visual studio alone didn't work, and the only step that works is deleting the damn .suo files. Perhaps they're being corrupted somehow? I read these steps on another forum, and it's the only thing that worked. – Triynko Oct 31 '17 at 04:12
  • The solution works for me but the annoying bit is that I have to do every time I open a solution (Tools → Options → ReSharper, Suspend button and Resume again). Still did not find a permanent solution – rumi Feb 06 '18 at 13:56
  • 1
    Solved my issue (I just installed VS2017, have VS2015 installed, and re-installed ReSharper 2017.3). "Some magic" was reset. – user2864740 Feb 14 '18 at 21:00
  • For me also didn't work and I've deleted .vs folder in solution and then all started working – Jernej Novak Sep 04 '18 at 07:14
  • I had to update my version of ReSharper to fix this. – Rob L Nov 09 '18 at 09:14
  • It works when suspended but the red bits come back again when resumed. – Amir Hajiha Jan 16 '19 at 11:12
  • 3
    pretty sad. I've removed resharper. None of these solutions fixed the problem and resharper makes visual studio which is already very slow way slower. Had enough with it. Resharper deleted. – Mike Oct 30 '19 at 16:28
  • 1
    for me just suspending resharper and resuming it again worked – Atiq Baqi Jul 11 '20 at 03:41
  • Problem still exists in VS 2022 with JetBrains dotUltimate 2019.3. @Lu55’s solution works here, too. – Informagic Mar 25 '22 at 10:41
  • VS 2022 & Rider 2023.3 - Clearing cache solved the problem for me. – cjpartin Mar 17 '23 at 22:18
245
VS -> Tools -> Options -> ReSharper Suspend button 
Clear Contents of -> AppData\Local\JetBrains\ReSharper\v7.1\SolutionCaches
VS -> Tools -> Options -> ReSharper Resume  button
Marcel
  • 2,466
  • 1
  • 11
  • 4
  • 81
    You can do Resharper > Options > Environment > General Click 'Clear Cashe' and then restart VS. Ty for the answer, helped me. – Johan Larsson Jul 16 '14 at 16:17
  • 3
    This worked for me :) other way to do it by Clear Cache from Visual studio itself ty – ThomasBecker Apr 17 '15 at 12:24
  • 2
    Clearing the cache didn't work for me. Deleting the content of the SolutionCaches folder did. – JayJay Oct 12 '15 at 18:33
  • 7
    This works for me to resolve an annoying "Cannot resolve method" warning. To add on, for resharper 9 in VS2013 the path is `\AppData\Local\JetBrains\Transient\ReSharperPlatformVs12\v01\SolutionCaches` – spinalfrontier Oct 30 '15 at 02:32
  • 11
    To add on again, this time for Resharper 10 in Visual Studio 2015, the path is %localappdata%\JetBrains\Transient\ReSharperPlatformVs14. I had v02, v03, and v04 subfolders in there - I deleted all of them and their contents. – StackOverflowUser Dec 21 '15 at 00:20
  • Suspending and resuming it worked for me (I didn't need to clear the cache). – Lifes May 31 '16 at 18:32
  • %localappdata% rather than %appdata% – bugged87 Oct 04 '17 at 19:42
  • Rather than trying to figure out where is the cache path for the current user depending on what version it is, using 'Resharper > Options > Environment: General > Clear Caches' button as [answer from Jeroen K](https://stackoverflow.com/a/20629276/301218) suggested. – Paul L Apr 03 '18 at 21:13
  • Please try clearing the whole %LocalAppData%\JetBrains\Transient folder and check the issue once again. – TheNerdyNerd May 13 '18 at 12:15
  • As @JayJay said, I deleted the whole folder after Resharper suspension. It worked fine. Not worked after button pressed. – tedebus Mar 05 '19 at 15:06
137

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

  1. Resharper > Options > Environment: General > Clear Caches
  2. Restart Visual Studio
Jeroen K
  • 10,258
  • 5
  • 41
  • 40
34

Clear Resharper cache: Resharper -> Options -> General -> Clear Caches, close and reopen the solution. It worked in R# 9.0 Update 1

Dio Phung
  • 5,944
  • 5
  • 37
  • 55
  • The menu option was General not "Generate" to get to Clear Caches – Kirsten May 14 '16 at 21:21
  • Doesn't appear to work in a .NET Core project for R# 9.2? Tried closing and reopening project, and VS... EDIT: It works now! For some reason had to restart twice before it worked! – user3791372 Nov 13 '16 at 21:41
  • thanks! this is the only solution that worked for me using VS 2017 Professional. – Pete Mar 01 '18 at 07:02
32

This happens in ReSharper when you have two different versions of the same library in your solution. For example project A references automapper version 1.1 and project B references automapper version 1.0.

Visual Studio will often compile and run as expected in the situation as it chooses one of the DLLs to bind to. However ReSharper gets massively confused. For me this should be a ReSharper error that it asks you to resolve rather than just going bonkers.

UPDATE:

I ran into this two days ago (a day after I made this post) by total coincidence and came across this link where they say that it is caused by a bug in the VS API. I tried everything that they recommended and was unable to resolve it even temporarily: I had Autofac 2.6.x that I'd downloaded from google.code and then swapped it over for the NuGet package version and it willfully refused to see the new reference no matter what I did.

They suggest installing the R# 8 EAP but for me it was less hassle to just downgrade to the old version of Autofac.

Not much in the way of help, but maybe useful.

satnhak
  • 9,407
  • 5
  • 63
  • 81
  • i edited my question with additional info about the extent of errors. 1 month ago, i changed my vs 2012 RC to vs 2012 RTM and this errors happened (without any change in my project). Now, what is your recommendation? – Ramin Bateni Mar 30 '13 at 20:57
  • 1
    Have you tried deleting all references and then re-adding them (you could be pointing at the old DLLs and that is confusing R#). – satnhak Mar 31 '13 at 09:09
  • I realize that my Visual Studio also has bigger problems: I can't add any reference to my projects (even inside new solutions and new projects), more info: http://stackoverflow.com/questions/15746529/mvc-website-package-updating-error-loading-type-library-dll-exception-from-h – Ramin Bateni Apr 03 '13 at 21:22
  • This got me going in the right direction after the accepted answer didn't work. For me, the library in question had an update available. I was planning on removing it and then adding it back in again, but I saw the update and tried that first. After updating the library, the issue worked itself out. – c0r3yz Mar 23 '15 at 14:18
  • This answer helped me with a similar situation. I referenced the AspNetCore.Mvc version 1.0.0 rc final in my project.json file which caused the issue the OP was seeing. I went back into the project.json file and changed the version to 1.0.0 which fixed the issue – WBuck Aug 10 '16 at 22:24
  • This issue shows with the Azure SDK for .Net on GitHub because the projects within refer .NETStandard versions 1.1 and 1.5 at the same time. – David Burg Feb 01 '17 at 00:47
31

This was happening to me with Visual Studio 2015 and ReSharper Ultimate 10.0.2. I tried pretty much all the solutions written prior to this answer (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!

SharpC
  • 6,974
  • 4
  • 45
  • 40
  • 1
    This also happened with Visual Studio 15 Preview and Resharper. These steps fixed the problem for me (hopefully it won't come back any time soon). Thanks! – jporcenaluk Nov 09 '16 at 00:42
  • VS 2017 here. It was the clearing of cache; shut down VS and restart; suspend Resharper and close VS; restart VS in solution and then start Resharper that did it for me. – RandomHandle Aug 24 '18 at 22:42
  • Clear cache and restart project solved the issue. Thanks! – Sukesh Chand Oct 29 '20 at 16:20
19

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

Wolf
  • 6,361
  • 2
  • 28
  • 25
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

nils
  • 558
  • 5
  • 13
  • I did something similar, I just deleted the entire AppData\Local\Jetbrains directory. I had a LOT of different versions in there including some that were newer than my current resharper install. – benstpierre Feb 24 '15 at 18:10
13

I had the same problem (VS 2017). In my case it was different versions of target framework - one assembly targeted 4.52, another 4.62 - after setting those to the same version in both assemblies it started working again.

Mikołaj Mularczyk
  • 959
  • 12
  • 20
12

As you see, the solution is what everyone has already mentioned - simply by Suspending ReSharper, then Clearing the Caches, and finally Resuming it. But, no one mentioned how to do it without closing/restarting Visual Studio.

Just follow these steps:

  1. Getting ReSharper Cache Location

    • Manually by going to ReSharper Options > Environment > General > Store Solution Caches in (Combo Box) (marked 2 in the image). Selecting Custom Folder, then Copying the location of the Caches Folder from the text box shown (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

    • Go to the location copied earlier in step 1 and delete everything 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)
Pang
  • 9,564
  • 146
  • 81
  • 122
Syed Ali Naqi
  • 701
  • 7
  • 15
  • 1
    Thanks! This is literally the only thing that worked for me. Resharper is beginning to be more of a problem than a solution these days.... so slow and buggy.... – Tor Mar 14 '19 at 14:16
  • All this did nothing to resolve the issue. Deleting Reshaper fixed the problem – Mike Oct 30 '19 at 16:36
10

Above links of clearing the cache and/or suspending the ReSharper did not work for me. I just 'refreshed' the project, which was showing this problem, from the solution explorer and the problem goes away. Sadly, it keeps on recurring and only option it to keep on refreshing every time this problem recurs.

I have VS2012 with ReSharper 8.1 on Windows 8

SharpC
  • 6,974
  • 4
  • 45
  • 40
sppc42
  • 2,994
  • 2
  • 31
  • 49
8

I was just having the same issue with ReSharper 8.2 in Visual Studio 2013, and none of the usual solutions here of clearing caches, suspending ReSharper or re-installing ReSharper was working.

In my case I ended up solving it as follows... I looked at one of the symbols that it couldn't resolve and noted it was in System.Web.Http.dll. I then found that this was in the Microsoft.AspNet.WebApi.Core NuGet package. I used the package manager console to try and uninstall that package, except of course it told me that it couldn't due to other dependencies.

So I uninstalled each dependency up to and including Microsoft.AspNet.WebApi.Core, and then re-installed each package again in the reverse order. ReSharper picked everything up correctly as it was installed, and now seems fine.

James Thurley
  • 2,650
  • 26
  • 38
  • Worked for me too. Just uninstall the nuget packages for the project, and reinstall them. – ceetheman Sep 11 '14 at 19:31
  • None of these worked for me especially playing with web api. did nothing – Mike Oct 04 '17 at 18:27
  • The last thing im going to do is delete dependencies of a project to get a poorly written app to work . I oped to delete resharper. problem solved and VS is much faster now. – Mike Oct 30 '19 at 16:35
6

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

Teoman shipahi
  • 47,454
  • 15
  • 134
  • 158
  • Updating VS, updating resharper, clearing cache automatically and manually and suspending resharper didn't help me. It's not a resharper issue, it is probably a VS bug. This worked for me. Thanks. – Milad Sep 10 '18 at 09:30
  • This did nothing what so ever. Pretty much like "refresh" which also did nothing. – Mike Oct 30 '19 at 16:36
6

I ended up needing to request Resharper to clear its cache along with doing it manually through Windows File Explorer. This finally resolved the issue for me.

  1. (As reported in many of the solutions here) RESHARPER > Options... > Environment > General > Clear Caches.
  2. Close Visual Studio.
  3. Go to this path in File Explorer for Resharper 10 in Visual Studio 2015: %localappdata%\JetBrains\Transient\ReSharperPlatformVs14
  4. Delete all subfolders and their contents within that folder.
  5. Restart Visual Studio, reload your Solution and wait for Resharper to initialize itself for the Solution.
StackOverflowUser
  • 945
  • 12
  • 10
6

For me for VS2015, I had to update Resharper to version 2016.2.2 to resolve the issue.

I had already tried (of which none worked for me):

  • suspending / resuming
  • suspending / clearing cach (using tools > options button) / resuming
  • suspending / clearing cach (using Windows file system) / resuming
  • moving cache to solution folder / restarting visual studio
  • many other combinations of all or some of above

I hope that may help someone.

Dib
  • 2,001
  • 2
  • 29
  • 45
  • this is just a copy paste of ther options. all did nothing to resolve the issue. – Mike Oct 30 '19 at 16:37
  • @Mike - Please feel free to link to the "other" post which advises updating R# to 2016.2.2, as I cannot see it. – Dib Feb 18 '20 at 16:03
5

Resharper -> Options Caches -> Store solution caches in: (Change folder to another one).

Or try to manually clean up R# cache folder

4

I'm using 7.1, and this worked for me:

  1. Uninstall resharper
  2. go to %appdata% and remove JetBrains\Resharper and ..\Local\JetBrains\Resharper folders
  3. re-install resharper
ragnar
  • 49
  • 2
4

None of the cache cleanup worked for me. All of the symbols in any of our private NuGet repros just stopped being picked up with R# enabled, very frustrating. I got this feedback from JetBrains support, which DID work, after toggling and restarting VS2019:

disable the following option - ReSharper | Options | Environment | General | Read solution model directly

Bob
  • 1,484
  • 5
  • 22
  • 44
3

I did everything above with no fix.

Then I did a step from another SO Q/A (don't remember which one) which was to set System.Web.Mvc to Copy Local true. Recompile my project and the errors went away.

When I set this assembly back to Copy Local false, the errors didn't return.

rythos42
  • 1,217
  • 2
  • 11
  • 27
3

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
Community
  • 1
  • 1
DanielS
  • 744
  • 6
  • 13
1

I am using VS2015, R#10. None of the suggested solution worked for me. I deleted the contents of the bin folder of my solution and rebuild the entire solution, that seems to have resolved the issue. Before deleting the contents of the bin folder, I had tried suspending and resuming R#, doing clear cache from R# -> option -> general setting, and also manually deleting the contents from \AppData\Local\JetBrains\Transient\ReSharperPlatformVs12\v01\SolutionCaches.. Hope it helps someone.

haku
  • 4,105
  • 7
  • 38
  • 63
1

I was having the same issue in my Visual Studio 2015 with Resharper Ultimate and tried the solutions as suggested above, but none worked for me.

Then upgrading Resharper to latest release solved my issue.

Ashraf Alam
  • 3,500
  • 32
  • 31
  • Yeah I've also come to the same conclusion. Unfortunately my R# subscription has run out which means I have to pony up another $400-$500 in order to upgrade my R# version to fix the error... – WBuck Aug 11 '16 at 11:39
1

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.

1

I have the same problem.Clean Resharper cache and Suspend Resharper not worked for me.I just close visual studio, uninstall Resharper,and then install Resharper,the problem was gone.

york
  • 108
  • 8
1

I was referencing a NetStandard2.0 project that didn't get recognized by R#. I cleared the caches but that did not help me.

Downloading the latest version and updating R# did work for me.

This is the version I'm now running:

JetBrains ReSharper Ultimate 2017.3.2  Build 111.0.20180201.63358
ReSharper 2017.3.20180201.111630

Just download R# and it will recognize already installed versions. Updating to the latest version is really easy.

Jorn.Beyers
  • 1,784
  • 2
  • 21
  • 26
1

When I disabled ReSharper, Visual Studio was also giving the same error, even though the project built successfully. What I did to resolve the issue was:

  1. Remove the project from the solution.
  2. Right-click the solution, Add Existing Project, select the project file and add it again.

After performing these steps, the syntax errors went away in Visual Studio, and after I enabled ReSharper again, it also had no errors.

Bork Blatt
  • 3,308
  • 2
  • 19
  • 17
  • My errors were all references related to a single nuget package. I removed and re-added the package. Errors gone. Thanks for the pointer. – Brett Sep 05 '19 at 17:26
1

I also had this problem. All previous solutions did not help for me or helped for a very short time. In my case, the problem was that I connected the .Net Framework 4.7.2 project to a project that has version 4.5.2. After I updated both projects to version 4.7.2, the problem was resolved. I think that to solve the problem you need to have the same version of the projects. Or connect a smaller version to a larger one, but not vice versa, as was the case in my case.

Richardok
  • 31
  • 5
1

In Rider 2020.3 I just did a Build -> Clean, and then it worked.

JohnFF
  • 723
  • 5
  • 20
0

For me, I think my solution just got caught in a weird state when I was changing which branch of my local Git repo I was on. Simply switching to the previous branch I was on before the problem started, telling VS to reload all the files, then switching back to the desired branch and reloading again fixed it.

HotN
  • 4,216
  • 3
  • 40
  • 51
0

We saw this problem as well, specific to files which were shared by multiple projects. There is a combo box in the upper left corner of the editor window that lets you switch project context for the file (and hence the references that impact symbol resolution).

Resharper makes it easy to accidentally open the wrong "version" of a shared file by its "go to file or symbol" commands.

Switching context back to the project I use in the solution was all I needed to do to fix this issue.

0

I also saw similar problems reported in ReSharper which did not lead to compile/runtime errors.

These were mostly seen when using "{x:Type ...}" or "{x:Static ...}" markup, causing ReSharper to report "Cannot resolve symbol 'Type'" or "Cannot resolve symbol 'Static'" errors.

Additionally there were many errors like "Invalid markup extension type: expected type is '<type>', actual type is '...Extension'".

The problem resolved itself when I added a reference to the System.Xaml assembly.

g t
  • 7,287
  • 7
  • 50
  • 85
0

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.

mikus
  • 3,042
  • 1
  • 30
  • 40
0

It should be a problem related to Resharper cache, but as far as I know, the "clear cache" feature works only if your cache is in Solution Folder. To check try this: Visual Studio > Tools > Options > Resharper > Options ...

In Resharper Options window > Environment > General check that "Store solution caches in" it's set to "Solution folder"

After this in solution folder you should see a new folder "_ReSharper.Caches". You should be able to clean it by pressing the "Clear caches" button, but (if this doesn't work) you can clean manually by removing inside files (in this case, Visual Studio has already to be closed).

Restart Visual Studio and everything should work. Have a look here [1] as well

[1] https://resharper-support.jetbrains.com/hc/en-us/articles/206546989-ReSharper-stopped-working-for-a-single-specific-solution

Note: Visual Studio 2015 Update 1 / ReSharper 10.0.2

Omar Venturi
  • 91
  • 1
  • 7
0

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.

Dakusan
  • 6,504
  • 5
  • 32
  • 45
  • Disclaimer: I posted this over 6 weeks ago but it was deleted because I posted the exact same answer to [this question](http://stackoverflow.com/questions/18905840). I tried responding to the deletion, but never received a response. The 2 questions that I responded to are quite different non-duplicates of each other, but my solution works for both of them. For me, both of the questions were different symptoms of the same problem. I spent many hours trying to find an answer to both symptoms, and what I wrote/coped to both posts is the only thing that worked, and is not documented elsewhere. – Dakusan Aug 05 '16 at 22:41
0

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
L.T.
  • 673
  • 7
  • 16
0

I tried all of the above solutions numerous times but none worked for me. I was using Visual Studio 2015 with ReSharper 9.0.

I was able to resolve this by upgrading to ReSharper 9.2. If you already have the latest update for your major version, maybe reinstalling ReSharper might fix this for you. I would suggest clearing you ReShaper cache first, just in case.

Here's the link to the archive versions of ReSharper: https://resharper-support.jetbrains.com/hc/en-us/articles/207242355-Where-can-I-download-an-old-previous-ReSharper-version-

hatsrumandcode
  • 1,871
  • 2
  • 19
  • 21
0

I had a similar issue. In my case, the length of my project path was too long for windows (above 248 characters).

My solutions compile okay in VS 2017 but ReSharper couldn't find the references. Interestingly I had an error in the Error Window even if the build was a success:

Severity Code Description Project File Line Suppression State Error MSB3491 Could not write lines to file "obj\Debug\netcoreapp2.1\My.Long.Path.Project.Name.csproj.CoreCompileInputs.cache". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. My.Long.Path.Project.Name C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 3430

So I shortened the project path and ReSharper worked okay.

0

I had the same issue where the project compiles fine (even after clean & build), but intellisense complains about missing references.

I tried everything from deleting the cache and disabling resharper, but nothing worked. In the end, I realized it was only a single project reference that showed intellisense errors.

My solution was to simply remove the reference to this project and add it again Everything worked as expected afterwards.

Burak
  • 667
  • 1
  • 11
  • 19
0

Had the same issue with JetBrains Rider 2021.3.3. Cleaning the solution, or restarting the IDE didn't help. The solution was going to File > Invalidate Caches..., making sure only ReSharper Caches is checked and then clicking Invalidate and Restart.

Eternal21
  • 4,190
  • 2
  • 48
  • 63
0

Had the same issue, the problem was that my folder name had on %20 on it, i think when you have especial characters it won't recognize libraries.

Cassius Abreu
  • 51
  • 1
  • 2
0

For me it was just an update required. Extensions -> Resharper -> Help -> Check for updates...

Craig Martin
  • 179
  • 2
  • 15
-9

I tested ALL of the other answers in this page (before writing this answer) such as:

  1. VS -> Tools -> Options -> ReSharper Suspend button and Resume

  2. Clear ReSharper cache

  3. And others

But unfortunately none of them solved my problem. Maybe my problem was complicated than your problem. I said about them in my EDITs in the question, then the following answer was correct solution for me but maybe other answers solve your problem. please test them first.

I was forced to reinstall my OS and use a newer version of my tools. :(

Now i use VS 2013 + R# v8 and when i have any problem with my resharper i just try the following instruction and it solve my problems:

VS -> Tools -> Options -> ReSharper Suspend button and Resume

Community
  • 1
  • 1
Ramin Bateni
  • 16,499
  • 9
  • 69
  • 98
  • 1
    Why is this in bold? There's obviously solutions better than re-installing your operating system. Why not contact their customer support or file a bug in their tracker? This is a very low quality answer to be accepted as the approved answer. – Joseph Lennox Feb 19 '15 at 22:21
  • 1
    Your answer is easy: Because no one of the answers worked for me! And this worked! So in my problem it was the correct answer. When i tested all these ways and failed... so in this case the correct answer is my last way. But I said you first try other ways... – Ramin Bateni Feb 20 '15 at 08:03
  • 6
    A note to anyone who's tried everything else on this page: contact JetBrain's support. They're extremely friendly and responsive. – Joseph Lennox Feb 21 '15 at 02:01
  • 1
    Please look at the question insert time. I wrote the question at 2013 and JetBrain's team did not provide any useful answer to this question here. My question was one of the important problems during using ReSharper. I wait for a answer but none of the answers did not help me. I was forced to change my OS 3 years ago to solve it! You should see the question time and its condition then down vote or up vote... – Ramin Bateni Jun 15 '16 at 20:03