Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReSharper: Symbol cannot be properly resolved

In the last week, I've started having an issue with ReSharper giving me a "Symbol cannot be properly resolved" error with @angular/core components. However, I know that those components are properly installed and my solutions still builds, publishes, and runs correctly.

This has been addressed in the past (Visual Studio 2015 Enterprise with ReSharper 10 Ultimate — Cannot be properly resolved) and it seems that the only answer was to disable ReSharper and wait for them to put out an update resolving the issue. Following the instructions mentioned here, I was able to set up hotkeys for disabling/enabling Resharper.

The issue goes away when ReSharper is disabled. However, I was wondering if a better answer has come out in the last two years... disabling ReSharper doesn't exactly seem like a good solution.

(I'm using Visual Studio Community 2017 15.8.1 and ReSharper 2018.1.4)

enter image description here

like image 451
JED Avatar asked Aug 20 '18 12:08

JED


2 Answers

EDIT '19

Everytime R# gets an update, this answer gets upvoted, so I assume this problem occurs when something goes wrong after updating R# to the newest version. The solution still applies for me.

I usually do the same workaround, without reinstalling it and after I have updated to the latest version of R#:

  1. Clear caches in: ReSharper > Options > Environment > General
  2. Suspend Now in: Tools > Options > ReSharper
  3. Exit Visual Studio
  4. Delete .vs and obj folders
  5. Open Visual Studio
  6. Resume Now in: Tools > Options > ReSharper

Works for me all the time, but again, I am working under C# and the "solution" might not apply to you.

like image 65
Nekeniehl Avatar answered Oct 24 '22 18:10

Nekeniehl


Usually it happens when you upgrade Resharper/Visual Studio to the newest version. Sometimes accepted answer doesn't help.

As a temporary solution before official fix you can set all *.ts files to be ignored by Resharper.

Resharper -> Options -> Code Editing -> Third-party Code -> Add file mask for *.ts files. Then restart Visual Studio. enter image description here

like image 1
Sam Alekseev Avatar answered Oct 24 '22 17:10

Sam Alekseev