title: Error on create instance of custom member resolver in AutoMapper 6
body: <p>I'm using AutoMapper 6 (AutoMapper.Extensions.Microsoft.DependencyInjection) for mapping data and view models in a .net core web api application.I have an age property on view model and use custom resolver for calculate age according to birth date come from data model.</p>
  
  <p>This is how i add AutoMapper in StartupClass:</p>
  
  <pre><code>services.AddAutoMapper(config =&gt; config.AddProfile(new AutoMapperProfiles()));
  </code></pre>
  
  <p>And this is AutoMapper profile class:</p>
  
  <pre><code>public class AutoMapperProfiles : Profile
  {
      public AutoMapperProfiles()
      {
          CreateMap&lt;User, UserDetailDTO&gt;()
              .ForMember(dest =&gt; dest.PhotoUrl, opt =&gt;
              {
                  opt.MapFrom(src =&gt; src.Photos.FirstOrDefault(p =&gt; p.IsMain).Url);
              })
          .ForMember(dest =&gt; dest.Age, opt =&gt;
          {
              opt.MapFrom&lt;AgeResolverForUserDetail&gt;();
          });
  
          CreateMap&lt;User, UserListDTO&gt;()
              .ForMember(dest =&gt; dest.PhotoUrl, opt =&gt;
              {
                  opt.MapFrom(src =&gt; src.Photos.FirstOrDefault(p =&gt; p.IsMain).Url);
              })
          .ForMember(dest =&gt; dest.Age, opt =&gt;
          {
              opt.MapFrom&lt;AgeResolverForUserList&gt;();
          });
  
          CreateMap&lt;Photo, PhotoDTO&gt;();
      }
  }
  </code></pre>
  
  <p>And this is AgeResolverForUserDetail:</p>
  
  <pre><code>public class AgeResolverForUserDetail : IValueResolver&lt;User, UserDetailDTO, int&gt;
  {
      public int Resolve(User source, UserDetailDTO destination, int destMember, ResolutionContext context)
      {
          return source.BirthDate.CalculateAge();
      }
  }
  </code></pre>
  
  <p>When i run my app and try to get a user detail, mapping objects throw an exception:</p>
  
  <p><strong>An unhandled exception occurred while processing the request.
  AutoMapperMappingException: Cannot create an instance of type DatingApp.Utility.AutoMapperUtilities.AgeResolverForUserDetail
  AutoMapper.MappingOperationOptions.CreateInstance() in MappingOperationOptions.cs, line 47
  AutoMapperMappingException: Error mapping types.
  Mapping types:
  User -> UserDetailDTO
  DatingApp.Models.DataModels.User -> DatingApp.Models.ViewModels.UserDetailDTO
  Type Map configuration:
  User -> UserDetailDTO
  DatingApp.Models.DataModels.User -> DatingApp.Models.ViewModels.UserDetailDTO
  Destination Member:
  Age</strong></p>
  
  <p>Can you give me a solution for this?</p>
  
  <p>thanks</p>