elsa-workflows / elsa-core

A .NET workflows library
https://v3.elsaworkflows.io/
MIT License
5.88k stars 1.06k forks source link

Migrate Elsa 2 to use AutoMapper 13.0.1 to avoid conflicts #5291

Open zetic-be opened 2 weeks ago

zetic-be commented 2 weeks ago

Hello,

When integrating Elsa in projects also having package dependencies on AutoMapper, when referenced version is >=13, it causes ambiguous issue when using extension method AddAutoMapper on IServiceCollection.

As this post suggest: https://stackoverflow.com/questions/78025475/asp-net-core-automapper-how-to-resolve-errorcs0121-the-call-is-ambiguous-betwe Remove the reference to the AutoMapper.Extensions.Microsoft.DependencyInjection package - no longer needed

Could you please update to latest version of AutoMapper to fix conflicts with other integrations.

Thank you in advance

glime-ai[bot] commented 2 weeks ago

To address the issue with integrating Elsa in projects that also have package dependencies on AutoMapper, where the referenced version is >=13, causing ambiguous issues with the extension method AddAutoMapper on IServiceCollection, you should follow the guidance provided in the Stack Overflow post you mentioned.

The solution is to remove the reference to the AutoMapper.Extensions.Microsoft.DependencyInjection package, as it is no longer needed with the latest versions of AutoMapper. The functionality that was previously provided by this package is now included in the main AutoMapper package.

If you are maintaining the project, you should update the project's dependencies to remove the AutoMapper.Extensions.Microsoft.DependencyInjection package and ensure that you are using the latest compatible version of AutoMapper.

If you are not the maintainer of the project, you should reach out to the maintainers of Elsa and request that they update the dependencies accordingly. You can do this by opening an issue on the Elsa GitHub repository or checking if such an issue already exists and has been addressed.

Please note that before making any changes or submitting a pull request, it is recommended to open an issue to discuss what you would like to do. This ensures that you don't spend time working on something that might not align with the project's goals or might already be under development by someone else.

This comment was generated by Glime.

zetic-be commented 2 weeks ago

Also more info here: https://docs.automapper.org/en/latest/13.0-Upgrade-Guide.html