ReSharper无法解析注释中的集合类型

Pio*_*ski 5 c# resharper

如果集合的名称出现在由cref属性引用的方法描述中,则ReSharper无法解析该集合的名称.

例如,在这个签名中,ReSharper强调了这个词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)
{

}
Run Code Online (Sandbox Code Playgroud)

当我将鼠标悬停在突出显示的区域时Cannot resolve symbol 'Dictionary'.该文件有一个引用System.Collections.Generic.同样的事情发生IEnumerableList.

它对代码没有任何影响,不会阻止编译或任何东西.我仍然希望保持我的文件清理,我不认为ReSharper首先应该在注释中解析名称时遇到问题.

我正在使用ReSharper 8.0.任何建议如何解决这个或如何更改我的意见,以摆脱这个"未解决"的警告高度赞赏.

Joh*_*ers 7

XML注释中有一个特定的语法用于引用泛型:

/// The <see cref="Dictionary{TKey,TValue}"/>
Run Code Online (Sandbox Code Playgroud)

  • 谢谢,这有帮助.有趣的是,我使用ReSharper生成注释,所以我希望它应该以正确的形式生成它. (2认同)