Skip to content

XML documentation missing on some members in generated code #76

@JosefNemec

Description

@JosefNemec

I use Generator.Equals in a project that has XML doc generation enabled via GenerateDocumentationFile in csproj. This leads to the compiler generating CS1591 warning on every class that's missing XML doc comments. But since I also have warnings and errors enabled for release builds, I can't really build the project. This started happening since 4.0.0, it doesn't happen with 3.3.0.

To reproduce:

  • enable <GenerateDocumentationFile>true</GenerateDocumentationFile>
  • add any class with [Equatable] to the project
  • try to compile the project

For example, this simple class:

[Equatable]
public partial class TestClass
{
    public string? Test { get; set; }
}

generates two CS1591 issues:

0>global__TestClass.Generator.Equals.g.cs(65,25): Warning CS1591 : Missing XML comment for publicly visible type or member 'TestClass.EqualityComparer'
0>global__TestClass.Generator.Equals.g.cs(67,40): Warning CS1591 : Missing XML comment for publicly visible type or member 'TestClass.EqualityComparer.Default'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions