Hi,
after the update of my solution to v7.1.0 for ASP.NET MVC 5.x & Angularjs 1.x .NET Framework 4.6.1 I've this expection in Mapper.Map(,)
System.InvalidOperationException: Mapper not initialized. Call Initialize with appropriate configuration. If you are trying to use mapper instances through a container or otherwise, make sure you do not have any calls to the static Mapper.Map methods, and if you're using ProjectTo or UseAsDataSource extension methods, make sure you pass in the appropriate IConfigurationProvider instance. at AutoMapper.Mapper.get_Instance() at AutoMapper.Mapper.Map[TSource,TDestination](TSource source, TDestination destination) at redo.Procedures.ProcedureAppService.<UpdateProcedureAsync>d__45.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__5
1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__51.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at redo.Procedures.ProcedureAppService.<CreateOrUpdateProcedure>d__37.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__5
1...`
I'm missing somethings?
5 Answer(s)
-
0
Hi,
This commit might solve your problem https://github.com/aspnetzero/aspnet-zero/commit/711ec2a5422296e9f1848161733af401d9d41f59#diff-71314f38f953a9e2cea56766e42b1af2
-
0
No unfortunatly no.
At the moment all Call made via AutoMapper.Map(input,Output) give the same error
-
0
We found a solution but I'm not sure is the correct way. Add this line off code at the end of first CustomDtoMapper. We add only at the first becasue if you use it on more module Automapper give an exception that say "Mapper already initialize"
// Add for AutoMap 8.x Mapper.Initialize((MapperConfigurationExpression) mapper);
-
0
I found another issue releted to this topic AutoMapper and CustomDto
-
0
Please follow Github's issue