docfx: xref and cref not working for some BCL types

The majority of BCL types work when used in xref in markdown and cref in /// comments, but some don’t, even though xrefservice returns information for them.

DocFX Version Used: 2.34

Template used: default

Steps to Reproduce:

  1. Set up docfx.json for BCL xrefs (ie “xrefService”: [ “https://xref.docs.microsoft.com/query?uid={uid}” ])

  2. Use the xref in a markdown article:

- <xref:System.Object>
- <xref:System.Int32>
- <xref:System.Data.SqlClient>
- <xref:System.Data.SqlDbType>
- <xref:System.Data.DbType.Int32>
- <xref:System.IComparable>
  1. Use the cref in a /// comment:
    /// <summary>
    /// <para><see cref="System.Object"/></para>
    /// <para><see cref="System.Int32"/></para>
    /// <para><see cref="System.Data.SqlClient"/></para>
    /// <para><see cref="System.Data.SqlDbType"/></para>
    /// <para><see cref="System.Data.DbType.Int32"/></para>
    /// <para><see cref="System.IComparable"/></para>
    /// </summary>
  1. Generate the HTML and look at the website

Expected Behavior:

All the xref & cref shows up correctly, with the correct hyperlinks.

Actual Behavior:

Only “System.Object” works in both markdown and /// comments, but none of the other references work in either markdown (showing <xref:System.Int32> etc.) or /// comments (showing System.Int32 etc.)

In api/*.yml, the failing types etc. are missing attributes:

references:
- uid: System.Object
  commentId: T:System.Object
  parent: System
  isExternal: true
  name: Object
  nameWithType: Object
  fullName: System.Object
- uid: System.Int32
  commentId: T:System.Int32
- uid: System.Data.SqlClient
  commentId: N:System.Data.SqlClient
- uid: System.Data.SqlDbType
  commentId: T:System.Data.SqlDbType
- uid: System.Data.DbType.Int32
  commentId: F:System.Data.DbType.Int32
- uid: System.IComparable
  commentId: T:System.IComparable

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 20 (5 by maintainers)

Most upvoted comments

Can we please reopen this issue? There are still BCL type that will not resolve in v2.5.2