Code inspection: Usage of <inheritdoc /> is invalid
This inspection reports <inheritdoc /> tags that cannot determine what documentation to inherit. That happens when there is no base documentation candidate, or when there are multiple possible candidates and the tag does not specify which one to use.
Example
public interface IFirst
{
void M();
}
public interface ISecond
{
void M();
}
class C : IFirst, ISecond
{
/// <inheritdoc />
public void M() { }
}
public interface IFirst
{
void M();
}
public interface ISecond
{
void M();
}
class C : IFirst, ISecond
{
/// <inheritdoc cref="IFirst.M" />
public void M() { }
}
Quick-fix
Specify the base documentation candidate using the cref attribute.
01 April 2026