DocFX Cross Reference Issues with .NET and ASP.NET Core Types - UidNotFound Errors

95 views Asked by At

I'm currently using DocFX version 2.74.0 for documentation generation in a project that involves .NET and ASP.NET Core. Recently, I've encountered an issue where cross references to .NET and ASP.NET Core types are no longer recognized, which was not the case previously.

The error I'm receiving is a warning about an invalid cross reference, specifically for Microsoft.Extensions.Hosting.IHost, as shown below:

C:\path\doc.md: warning UidNotFound: 1 invalid cross reference(s) "<xref:Microsoft.Extensions.Hosting.IHost>".

Here's the relevant section of my docfx.json:

{
  "build": {
    // other settings...
    "xrefService": [
      "https://learn.microsoft.com/api/xref/query?uid={uid}"
    ]
    // other settings...
  }
}

This configuration worked fine before, but now it seems to be failing. I haven't made any significant changes to the DocFX setup or the project that could lead to this issue.

Questions:

  1. Has there been any known changes in DocFX or the Microsoft xref service that might cause this issue?
  2. Is there a specific configuration or version compatibility I need to be aware of to ensure proper cross-referencing for .NET and ASP.NET Core types?
  3. Could there be other factors within my project or DocFX setup that might be leading to these UidNotFound errors?

Any insights or suggestions to resolve this issue would be greatly appreciated. Thank you!

1

There are 1 answers

0
Martin Obrátil On BEST ANSWER

The xrefservice was retired and remove in version 2.65.0: https://github.com/dotnet/docfx/pull/8595