But every once in a while ReSharper loses its mind…
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.
It does require a restart of Visual Studio which is a bit unfortunate but at least it gets rid of those errant red squiggles.