Skip to content

[Regression] Nonsense links are rendered when source generators are used #10850

@bkoelman

Description

@bkoelman

Describe the bug
When a public class internally uses the logger source generator, nonsense links are rendered in the output html of API docs.

To Reproduce
Steps to reproduce the behavior:

  1. Create a class library that contains a public type, whose implementation uses the .NET logger source generator
  2. Run docfx to generate the website

Expected behavior
Correct links are rendered, or the links are omitted entirely (which is what earlier docfx versions did).

Actual behavior
Nonsense links are rendered, for example:

<a class="header-action link-secondary" title="View source" href="https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/dev/src/JsonApiDotNetCore/obj/Release/net8.0/Microsoft.Extensions.Logging.Generators/Microsoft.Extensions.Logging.Generators.LoggerMessageGenerator/LoggerMessage.g.cs/#L6"><i class="bi bi-code-slash"></i></a>

Context (please complete the following information):

  • OS: Windows
  • Docfx version: v2.79.0
  • .NET version: .NET 9

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotnetGenerate .NET API reference docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions