Mike-Ward.Net

Quick Tip - Clear ReSharper's Cache to Fix False Errors

I rely on ReSharper to spot errors and suggest code refactorings. I particularly like how it can simplify boolean expressions. It’s always reminding me there are new features in the language (C# and JavaScript) that can improve my code.

But every once in a while ReSharper loses its mind…

By that I mean it starts flagging items as errors that are not. It seems to happen in JavaScript more than C#. Clearly, the ReSharper engine is out of sync with the code. Once it gets into this funk, it stubbornly remains that way for that file.

I’ve tried removing the code and pasting it back in or renaming the file but it refuses to comply. I’ve learned to ignore it and over the course of a few days, it eventually rights itself.

If only there was a way to reset it.

I don’t remember where I spotted it on Twitter so I can’t give credit, but ReSharper has a way of clearing its cache, which effectively does a reset. In the ReSharper options under the General tab, there’s a button to clear the cache.

ReShaper options page

It does require a restart of Visual Studio which is a bit unfortunate but at least it gets rid of those errant red squiggles.

← newer older →
.Net, Technology, Life, Whatever

Recent Posts

Checklist Buddy Available for Testing
Tweetz 2.0.0 Released
Tweetz 2.0 Beta
VSColorOutput 2.7 - Time Stamps
Fixed Focal-Length Eyeglasses, a Programmer's Best Friend
How to Choose the Right VPN Service
Two Handy Command Line Scripts
More... (1089)

Donate