How to make ReSharper re-evaluate its assembly reference highlighting

我的未来我决定 提交于 2019-11-27 16:41:17
iggymoran

Except for reinstalling, the only way to successfully clear the caches is to delete the files manually from your AppData directory.

Delete the solution folder that's giving you grief in the following locations:

  • %LOCALAPPDATA%\JetBrains\ReSharper\v7.1\SolutionCaches\
  • %LOCALAPPDATA%\JetBrains\Transient\ReSharperPlatformVsXX\vXX\SolutionCaches\ for newer versions.

Note that the version numbers in the paths may be different depending on the ReSharper version that is installed.

The XX in vXX and VsXX represents any number, because there might be multiple folders where the solution cache is stored.

Try unloading and then reloading the project.

To unload the project, right-click the project in the solution explorer, and select Unload Project. Then, right-click the project again and select Reload Project.

The issue continues to occur occasionally with the latest versions of ReSharper, but the fix seems to work for every version.

brgerner

You could try clearing the ReSharper cache via menu ReSharperOptionsEnvironment/General → button Clear Caches.

This worked for me. There is no need to reload projects. You can do this from within Visual Studio.

  1. Clear the ReSharper cache via ReSharper, Options, General, click 'Clear Caches'.

  2. ReSharper, Windows, select 'Solution Errors'. This will launch the Solution Errors window. At the top of this window, click the button to 'Reanalyze Files With Errors/Warnings'.

Open ReSharper - Options - Environment - General, scroll down to Msbuild access and select Obtain data from msbuild after each compilation.

This worked for me, using ReSharper 10.0.1 with ReSharper Build.

Peter

Go to ReSharper → WindowsSolution Errors Window, and you will get an overview of the errors in your solution. There, you can click the button Reanalyze Files With Errors.

If you want, you can assign a shortcut to this. Go to ToolsOptionsKeyboard, and search for "Reanalyze". You can assign a keyboard shortcut to either 'ReSharper_ErrorsView_ReanalyzeAllFiles' or 'ReSharper_ErrorsView_ReanalyzeFilesWithErrors'.

I have a similar issue with nuget packages and I found a most weird workaround: select the reference in project reference list and press 'F4'. Somehow properties window appearance causes resharper to reevaluate available references...

I am not certain this is the same root cause, but I discovered that, within the ReSharper options, "Use MsBuild" was checked and I got all sorts of erroneous errors reported. Try checking "ReSharper->Options->General" and see what state the "Use MsBuild" check is in.

BJury

Go to ReSharper → OptionsGeneral and click Clear Caches. (I have 8.2, so if you're on a different version it may be elsewhere.)

You'll then need to re-open your solution, and ReSharper will re-analyse everything.

Muhammed Eassa P N

Run the following code in a command prompt. Then solve the ReSharper issue...

del /q/f/s %TEMP%\*

The only thing that helped me is: Unistall and than Install Resharper again (Repair didn't work)

Visual Studio 2010 SP1, ReSharper 7.1.3000.2254

This is a strange issue, and is still alive and well in version 8.2.3 (build 8.2.3000.5176).

What seems to work for me on a consistent basis is to do a solution rebuild.

In VS 2013: Build -> Rebuild Solution

If the solutions above don't work you can try resetting the project output type. This seems to fix the issue on VS2015 Update 1 with ReSharper 10.1

For me none of the above worked. I had to install the new version of Resharper which supports NET Core 2.0.

Resharper was reporting a missing reference from a project that was included in the references. After trying the other solutions here, I disabled Resharper via the instructions this answer, and I found that Visual Studio's intellisense still reported the same errors.

At this point, I realized there was probably something wrong with the project file. I suspected a reference had gotten subtly corrupted during a merge.1

I deleted the reference it was complaining it couldn't find and re-added it. The errors from Visual Studio went away. Then I re-enabled Resharper, and it was no longer complaining about errors in my project.


  1. When I checked to see what had changed in the csproj file, what I found was an extra </Compile> that had no corresponding open tag. So it was indeed a merge error.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!