Skip to content

Microsoft.AspNetCore.OpenApi -> MapOpenApi does not work with Microsoft.OpenApi (version 2.0.0) #62747

@VYDocuWare

Description

@VYDocuWare

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Hello.

Microsoft.AspNetCore.OpenApi -> app.MapOpenApi(); does not work when the referenced version of Microsoft.OpenApi is 2.0.0. On app.Run(), I get

'Could not load type 'Microsoft.OpenApi.Models.OpenApiDocument' from assembly 'Microsoft.OpenApi, Version=2.0.0.0

Expected Behavior

The app starts without issue.

Steps To Reproduce

Here is a reproduction repository: https://github.com/VYDocuWare/OpenApiReproduction

Try to run the project, and you'll get the error.

Exceptions (if any)

'Could not load type 'Microsoft.OpenApi.Models.OpenApiDocument' from assembly 'Microsoft.OpenApi, Version=2.0.0.0

.NET Version

9.0.301

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Status: Resolvedarea-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