Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReSharper cannot resolve collection type in comments

Tags:

c#

resharper

ReSharper has trouble resolving a name of the collection if it appears in a method description, referenced by cref attributed.

For instance in this signature ReSharper underlines the word Dictionary:

/// <summary>
/// The reconstruct in single account.
/// </summary>
/// <param name="programId">
/// The program id.
/// </param>
/// <returns>
/// The <see cref="Dictionary"/>.   // <-- here the "Dictionary" is underlined
/// </returns>
Dictionary<long, Account> ReconstructInSingleAccount(long programId)
{

}

When I hover over highlighted area it says Cannot resolve symbol 'Dictionary'. The file has a reference to System.Collections.Generic. The same happens for IEnumerable and for List.

It doesn't have any influence on code, doesn't prevent compiling or anything. Still I prefer to keep my files cleaned and I don't think ReSharper should have problems resolving names in comments in the first place.

I'm using ReSharper 8.0. Any suggestion how to fix this or how to change my comments to get rid of this "unresolved" warning highly appreciated.

like image 515
PiotrWolkowski Avatar asked Dec 12 '14 19:12

PiotrWolkowski


1 Answers

There's a particular syntax within an XML comment for referring to generics:

/// The <see cref="Dictionary{TKey,TValue}"/>
like image 69
John Saunders Avatar answered Oct 13 '22 15:10

John Saunders