Skip to content

MissingMethodException with OData v8.1.0Β #980

Closed
@AndreaCuneo

Description

@AndreaCuneo

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

After update Microsoft.AspNetCore.OData from v8.0.12 to v8.1.0, the following exception is thrown

'Microsoft.OData.ModelBuilder.Config.DefaultQuerySettings Microsoft.AspNetCore.OData.ODataOptions.get_QuerySettings()'

during Swagger generation, tied to ApiDescription.

System.MissingMethodException: Method not found: 'Microsoft.OData.ModelBuilder.Config.DefaultQuerySettings Microsoft.AspNetCore.OData.ODataOptions.get_QuerySettings()'.
at Asp.Versioning.ApiExplorer.ODataApiDescriptionProvider.ExploreQueryOptions(IEnumerable`1 apiDescriptions)
at Asp.Versioning.ApiExplorer.ODataApiDescriptionProvider.OnProvidersExecuted(ApiDescriptionProviderContext context)
at Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionGroupCollectionProvider.GetCollection(ActionDescriptorCollection actionDescriptors)
at Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionGroupCollectionProvider.get_ApiDescriptionGroups()
at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GetSwaggerDocumentWithoutFilters(String documentName, String host, String basePath)
at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GetSwaggerAsync(String documentName, String host, String basePath)

This happens on Asp.Versioning.OData.ApiExplorer v6.4.1.

    <PackageReference Include="Asp.Versioning.Http" Version="[6.4.0,7)" />
    <PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="[6.4.0,7)" />
    <PackageReference Include="Asp.Versioning.OData.ApiExplorer" Version="[6.4.1,7)" />

Expected Behavior

Work as per v8.0.12

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

6.0

Anything else?

ASP.NET Core v6

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions