8 Answer(s)
-
0
hi
Did you add the Automapper package to your project manual?
Please search
Automapper
in all.csproj
files. -
0
I didn't. I've searched and didn't find any. It's all :Volo.Abp.AutoMapper 5.3.2
-
0
We are using the standard application template with Angular UI and all application services (and their associated tests) fail with what I think is the same issue.
I upgraded all Nuget package references to v5.3.2 and all NPM package references for Angular to 5.3.2 from 5.2.1. After the upgrade, all application unit tests fail with the message below.
EDIT: I can comment out all of mapping defined in my project and I still get this error.
Message: Volo.Abp.AbpInitializationException : An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module OtisEd.Zipline.ZiplineTestBaseModule, OtisEd.Zipline.TestBase, Version=0.1.1.0, Culture=neutral, PublicKeyToken=null: An exception was thrown while activating Volo.Abp.ObjectMapping.DefaultObjectMapper`1[[Volo.Abp.Identity.AbpIdentityDomainModule, Volo.Abp.Identity.Domain, Version=5.3.2.0, Culture=neutral, PublicKeyToken=null]] -> Volo.Abp.AutoMapper.AutoMapperAutoObjectMappingProvider`1[[Volo.Abp.Identity.AbpIdentityDomainModule, Volo.Abp.Identity.Domain, Version=5.3.2.0, Culture=neutral, PublicKeyToken=null]] -> λ:Volo.Abp.AutoMapper.IMapperAccessor -> λ:Volo.Abp.AutoMapper.MapperAccessor.. See the inner exception for details. ---- Autofac.Core.DependencyResolutionException : An exception was thrown while activating Volo.Abp.ObjectMapping.DefaultObjectMapper`1[[Volo.Abp.Identity.AbpIdentityDomainModule, Volo.Abp.Identity.Domain, Version=5.3.2.0, Culture=neutral, PublicKeyToken=null]] -> Volo.Abp.AutoMapper.AutoMapperAutoObjectMappingProvider`1[[Volo.Abp.Identity.AbpIdentityDomainModule, Volo.Abp.Identity.Domain, Version=5.3.2.0, Culture=neutral, PublicKeyToken=null]] -> λ:Volo.Abp.AutoMapper.IMapperAccessor -> λ:Volo.Abp.AutoMapper.MapperAccessor. -------- System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. ------------ System.MissingMethodException : Method not found: 'Void AutoMapper.IMemberConfigurationExpression`3.MapFrom(System.Linq.Expressions.Expression`1<System.Func`2<!0,!!0>>)'.
-
0
hi otee@urvin.finance and scott7106
Can you share a project to reproduce the issue? liming.ma@volosoft.com
-
0
hi
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Void AutoMapper.IMemberConfigurationExpression
3.MapFrom(System.Linq.Expressions.Expression
1<System.Func2<!0,!!0>>)'. at OtisEd.Alerts.AlertsApplicationAutoMapperProfile.<>c.<.ctor>b__0_3(IMemberConfigurationExpression
3 opt)Can you share a sample project? You can use the template project.
-
0
Interesting. This is an embedded module we use for generating user alerts. This is a different error from what I am seeing which points to the Volo.Abp.Identity.AbpIdentityDomainModule. Did you change something to get the different error? Or is that the initial error you received?
Let me upgrade the module to 5.3.2 and subsequently AutoMapper 11 and see what happens. For what it is worth, here is the AutoMapper code from that module.
using AutoMapper; using Volo.Abp.AutoMapper; using OtisEd.Alerts.Messages; namespace OtisEd.Alerts; public class AlertsApplicationAutoMapperProfile : Profile { public AlertsApplicationAutoMapperProfile() { /* You can configure your AutoMapper mapping configuration here. * Alternatively, you can split your mapping configurations * into multiple profile classes for a better organization. */ CreateMap< MessageCreateDto, AlertMessage >() .IgnoreAuditedObjectProperties() .Ignore(x => x.Id) .Ignore(x => x.TenantId) .ForMember(dest => dest.IsRead, opt => opt.MapFrom(x => false)); CreateMap< AlertMessage, MessageDto >(); } }
-
0
Upgrading the alerts module resolved the issue for me. Thanks for your help.
-
0
Good news.