Skip to content

OpenApi XML comment cache gneration fails with System.ArgumentException: An item with the same key has already been added #64378

@twenzel

Description

@twenzel

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I've mirgated to .NET 10 and enabled OpenApi and added the <InterceptorsNamespaces>$(InterceptorsNamespaces);Microsoft.AspNetCore.OpenApi.Generated</InterceptorsNamespaces> property to my project as the compiler told me to.

No I get an error System.ArgumentException: An item with the same key has already been added within the generated Mcrosoft.AspNetCore.OpenApi.Generated.XmlCommentCache class. Some elements occurs multiple times there.

Why?

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Attention 👋This issue needs the attention of a contributor, typically because the OP has provided an update.area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-openapi

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions