3

Since I upgraded to Visual Studio 2017 ReSharper shows me lots of errors even though the code is OK and compiles fine.

For example, I see the following error (red wiggly line) in a .cs file:

Local variable 'conflictInfo' is never used

even tough it is used in the very next line:

Local variable 'conflictInfo' is never used

I also see wrong warnings (yellow).

I tried the fixes suggested in Visual Studio displaying errors even if projects build but they did not solve the problem. As soon as solution wide analysis is done with processing the source files the wiggly red lines reappear.

Any advice? Thanks!

  • ReSharper Version: Ultimate 2017.3 built from 2017-12-18
  • Visual Studio Version: Enterprise 2017 15.5.27130.2010

Maybe this issue is related to ReSharper's static analyzer appears to be corrupted. How do I fix it?

Georg Patscheider
  • 9,357
  • 1
  • 26
  • 36
  • In a .CS file? It's an error or warning? (Can't see the image attached right now) – zc246 Dec 20 '17 at 15:43
  • Yes, this occurs in .cs files. I see errors (red wiggly lines) and warnings (yellow. e.g. "Parameter is never used") where they do not belong. I edited my question. – Georg Patscheider Dec 20 '17 at 15:45
  • 1
    Close VS, and try https://stackoverflow.com/a/17806179/2710486 ? – zc246 Dec 20 '17 at 15:48
  • @zcui93 good tip, but no luck. I deleted from `%AppData%\Local\JetBrains\Transient\ReSharperPlatformVs15\v11_xxx\SolutionCaches` but error reappears after source files are reanalyzed :( – Georg Patscheider Dec 20 '17 at 15:57
  • It seems like ReSharper 2017 does not hold any solution caches in `%AppData%\Local\JetBrains\ReShaper\vXXX` anymore. – Georg Patscheider Dec 20 '17 at 16:04
  • I'm out of idea :P perhaps a bug of Resharper. You can temporarily disable this type of warning first I guess. – zc246 Dec 20 '17 at 17:03
  • I have the same issue. Mine started after applying a new license to VS 2017. – Doug Kimzey Mar 28 '18 at 14:26
  • Our VS2017 licences are renewed regularly every couple of months too. – Georg Patscheider Mar 28 '18 at 14:29
  • 3
    I was actually having an issue that I was blaming resharper for, but it turned out to be the visual studio 2017 cache. i.e. ... Close the happily compiling sln, delete the hidden .vs folder in the solution root, and reopen. Worth a shot... – MattWazEre Oct 02 '18 at 03:01
  • @MattWazEre I deleted the .vs hidden folder from the solution, but the problem still persists :( – Georg Patscheider Oct 02 '18 at 12:51
  • @MattWazEre Thanks, that did it for me! – bostero2 Feb 22 '19 at 10:45
  • I had the same issue with VS 2019, and Resharper 2019.3, but in fact it was NOT an issue. The fact that the project builds does not necessary mean that Resharper will not find errors. In my case there were some errors in some xml test files in my NUnit project. In order to quickly find them Go to ReSharper → Windows → Solution Errors Window, and you will get an overview of the errors in your solution. – shelbypereira Feb 26 '20 at 09:18

0 Answers0