Closed penfold closed 4 years ago
When I comment out AM.Coll, the SO does not occur.
services.AddAutoMapper(configurationExpression => { //configurationExpression.AddCollectionMappers(); }, typeof(MapperFactoryExtensions).Assembly);
Upgrading from AM 9.0.0 to 10.1.1 and AM.Coll 6.0.0 to 7.0.0. (And .net core 3.1 to .net 5)
Is it possible have some exception handling in that stack to get feedback on which types are causing the issue?
I've grabbed all of the source code to help debug. It seems to be stumbling (in a recursive way) when calling EquivalentExpressionAddRemoveCollectionMapper.MapExpression(...) for
.ForMember(d => d.Errors, o => o.MapFrom((s, d) => s.Errors?.Split(';')));
This is string[] to IList\<string> .
I've tested my .net core 3.1 branch with the latest versions of AM and AM.Coll. This looks to be working correctly.
I then updated AutoMapper.Extensions.Microsoft.DependencyInjection and the SO is now seen.
Seems very similar to #151. Preserve References is not getting used and goes into SO loop.
You can try updating to 7.0.1-ci-00105 from nuget feed AM-prerelease and see if that fixes your problem
Same issue with .net 5.0 AutoMapper 10.1.1, AutoMapper.Collection 7.0.0, AutoMapper.Extensions.Microsoft.DependencyInjection 8.1.0
I am getting error with .net 5.0 , AutoMapper 10.1.1, AutoMapper.Collection 7.0.0, AutoMapper.Extensions.Microsoft.DependencyInjection 8.1.0.
I tried AutoMapperCollection 7.0.1-ci-00105 and worked without errors. When do you plan to release this fix? Thanks.
When I fix the deployment pipeline to nuget which has changed to GitHub Actions from AppVoyer
Got it pushed fix is in 7.0.1
I'd just like to point out that I'm getting this exact same issue. I'm running AutoMapper v12.0.1 and AutoMapper.Collection v9.0.0.
TLDR See whole chain of comments. It looks to be caused by AutoMapper.Extensions.Microsoft.DependencyInjection.
I'm getting a SO in Visual Studio when my WebApp starts up. I have extensive usage of Automapper, but I get nothing other that a SO. The call stack is:
Then SO.
Are you able to give me an idea of how I could start to debug this? (There's not much to go on.)
Thanks, Paul