I'm having a problem with ReSharper giving obviously wrong advice. For example, in the following code sample, ReSharper is saying that the response
, dates
, and ex
variables are never used, when they are clearly used on the following lines:
Dim response As New WcfResponseBoolean
Try
' ReSharper identifies 'b' as unused, but it is used on the next line.
b = Builders.CastBuilderFromSession
If b Is Nothing Then
response.SetSessionExpired()
Return response
End If
' ReSharper identifies 'dates' as unused, but it is used on the next line.
Dim dates As New List(Of DateTime)({ConvertToUSDateTime(inWithTime)})
CompareDateList(response, inTimeToCompare, New ComparableDatesList()
With {.Dates = dates, .CheckCompareType = compareType}, False)
' ReSharper identifies 'ex' as unused, but it is used on the next line.
Catch ex As Exception
MailHandler.SendExceptionEmailToBTDebug(ex, "CompareDates")
response.SetUnhandledException()
End Try
I've followed the advice from this link to try clearing ReSharper's caches by going to ReSharper --> Options --> Environment --> General and clicking the "Clear Caches" button. But when I click that button, I get no feedback from ReSharper that anything happened. The screen just sits there; no popup message, no UI feedback of any kind. And when I click the Save button to close the form, the problem persists.
TL;DR:
Is there a different way I can clear ReSharper's cache? Failing that, is there a different way to get the static analyzer working again?
I'm running ReSharper 8.1.23.546 in Visual Studio 2012 (version 11.0.61030.0).
UPDATE 1:
I've also tried cleaning and rebuilding the project, and closing and opening Visual Studio. Neither of these have had any effect. The only two things I can think to do from here are:
- Delete ReSharper's cache files manually. But I don't know where they are located, and I'm not sure that is safe to do.
- Uninstall and reinstall ReSharper. But that seems drastic. I'd prefer not to do this unless it is the only option left.
UPDATE 2:
I used citizenmatt's answer to locate and delete the cache files, but it didn't make any difference. ReSharper is still identifying the variables as unused.
I also rebooted my PC, which I had not done yet, but as I expected that didn't really change anything. I may be getting to the point that uninstalling and reinstalling is the only option left.
UPDATE 3:
I came back from lunch and decided to bite the bullet and do an uninstall and reinstall. That did not fix this issue either. Now I'm getting desperate.