Skip to content

[Bug] Failure with inheritdoc under certiain circumstances #9518

Open

Description

Actual behavior
docfx fails to inherit documentation when <inheritdoc> is used under certain circumstances:

  • inheriting from .net type (e.g. object.ToString(), object.Equals(), etc) and
  • project TargetFramework is "netstandard2.0"

Failure netstd2 ext

Please note that doc inheritance works well:

  • for other TargetFramework, e.g. "net6.0"
  • for types created within the project, e.g.
  • with Visual Studio hint

Success1
Success2
Success VS

Expected behavior
Documentation should be inherited like it happens for other target frameworks or for other types.

To Reproduce
See minimal sample project here:
https://github.com/Lesnik4u/DocFxInheritdocIssueTest
particularly, see the override MyLibBaseClass.ToString().

namespace MyClassLibrary
{
    /// <summary> Description in the BASE class. (TargetFramework = netstandard2.0) </summary>
    public class MyLibBaseClass
    {
        /// <summary> Description in the BASE class. </summary>
        public virtual void MyMethod() { }

        // inheritdoc FAILURE!
        /// <inheritdoc/>
        public override string ToString() => "";
    }


    /// <inheritdoc/>
    public class MyLibChildClass : MyLibBaseClass
    {
        /// <inheritdoc/>
        public override void MyMethod() { }
    }
}

Context:

  • OS: Windows 10 pro
  • Docfx version: v2.73.1
  • .NET Core SDK: v6.0.300

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugA bug to fixdotnet: xml-commentXML comment for .NET API reference docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions