7

I've been having trouble previewing the contents of my collection for a while now.

The message is:

Count = Evaluation of System.Private.CoreLib : System.Collections.Generic.List<T> : get_Count () is disabled. Use context menu to enable

enter image description here

As you can see in the screenshot, there is a 'Refresh' button. When I click it, I can see results, but when I move my mouse, the window disappears because the next window is smaller :/

How do I fix this? About 2 months ago, everything was working fine. I have the newest version of Rider and my license is paid and active.

Pang
  • 9,564
  • 146
  • 81
  • 122
Nesto
  • 177
  • 2
  • 5

2 Answers2

9

Please try any of the following:

  • Instead of just clicking refresh, right click on it and it will open a context menu. Select Enable Evaluation Of Selected Item in the dropdown
  • Delete the .idea folder in the root of your project when Rider is not running, then open your project in Rider again and check if the issue is gone
  • Update project to .net6

The problem has been reported as a bug in Rider's YouTrack.

Pang
  • 9,564
  • 146
  • 81
  • 122
Korfu
  • 673
  • 5
  • 20
  • 3
    I didnt have option 'Enable Evaluation Of Selected Item'. Deleting .idea directory worked! Thanks – Nesto Mar 08 '22 at 14:17
0

You can also remove <option> entries (2 examples shown) from workspace.xml inside the .idea folder instead of deleting the folder, then restart Rider.

  <component name="DisabledMethodsStorage">
    <option name="disabledMethods">
      <set>
        <option value="mscorlib : System.Collections.Generic.List&lt;T&gt; : Contains (T)" />
        <option value="mscorlib : System.Collections.Generic.List&lt;T&gt; : get_Count ()" />
      </set>
    </option>
  </component>
gnivler
  • 100
  • 1
  • 13