Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The call is ambiguous between the following methods or properties: Microsoft.AspNetCore.Mvc.Versioning with .net8 #5392

Open
elifbozalp opened this issue May 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@elifbozalp
Copy link

elifbozalp commented May 16, 2024

The call is ambiguous between the following methods or properties: 'Microsoft.Extensions.DependencyInjection.IServiceCollectionExtensions.AddApiVersioning(Microsoft.Extensions.DependencyInjection.IServiceCollection, System.Action<Microsoft.AspNetCore.Mvc.Versioning.ApiVersioningOptions>)' and 'Microsoft.Extensions.DependencyInjection.IServiceCollectionExtensions.AddApiVersioning(Microsoft.Extensions.DependencyInjection.IServiceCollection, System.Action<Asp.Versioning.ApiVersioningOptions>)'

Microsoft.AspNetCore.Mvc.Versioning is already deprecated. We should use Api.Versioning package to manage api versioning. But, we can not use the new packages because old packages come from the Elsa.Server.Api (2.14.1)

Elsa doesn't look good to use with .net8. Can you fix it, please?

image
image

@elifbozalp elifbozalp added the bug Something isn't working label May 16, 2024
Copy link

glime-ai bot commented May 16, 2024

Based on the information provided, it seems you are encountering an issue with ambiguous method calls due to conflicting versions of API versioning packages when using Elsa with .NET 8. The error suggests that there are two AddApiVersioning extension methods available, one from Microsoft.AspNetCore.Mvc.Versioning and another from Asp.Versioning, which is causing the ambiguity.

As of my knowledge cutoff date in early 2023, there is no official .NET 8 release, so I assume you are referring to a future or hypothetical version or it might be a typo for .NET 6 or .NET 7. Elsa Workflow is designed to work with .NET Core 3.1 and above, including .NET 5, .NET 6, and .NET 7.

To address the issue, you should ensure that you are using compatible versions of the Elsa packages and their dependencies. If Microsoft.AspNetCore.Mvc.Versioning is deprecated and causing conflicts, you should remove it and use the recommended Api.Versioning package instead. However, if Elsa.Server.Api has a dependency on the deprecated package, you may need to wait for an update from the Elsa team that resolves this dependency issue.

You can also check the Elsa GitHub issues and discussions to see if there is an ongoing conversation about this problem or if a solution has been provided. If not, you may consider opening a new issue to bring this to the attention of the Elsa maintainers.

In the meantime, if you are blocked by this issue, you might consider downgrading to a version of .NET that is known to be compatible with the current stable release of Elsa or exploring alternative approaches for API versioning that do not conflict with Elsa's dependencies.

Please verify the exact version of .NET you are using and check the latest documentation and release notes for Elsa to see if there have been any updates or fixes related to this issue.

This comment was generated by Glime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant