title: No parameterless constructor defined for this object, automapper 8 and IValueResolver
body: <p>I use AutoMapper 8 in a project and I want to make use of a resolver as shown below. The problem I got this message error:</p>
  
  <blockquote>
    <p>MissingMethodException: No parameterless constructor defined for this
    object.</p>
  </blockquote>
  
  <p>and I don't know if I missing something here.</p>
  
  <pre><code>public class ExcelClientProfile : Profile
      {
          public ExcelClientProfile()
          {
              CreateMap&lt;Ticket, ExcelClient&gt;()
                  ...
                  .ForMember(d =&gt; d.FormModel, s =&gt; s.MapFrom&lt;FormBuilderWithAnswerResolver&gt;());
          }
      }
  
      public class FormBuilderWithAnswerResolver : IValueResolver&lt;Ticket, ExcelClient, FormModel&gt;
      {
          private IFormBuilderService _formBuilderService;
  
          public FormBuilderWithAnswerResolver(IFormBuilderService formBuilderService)
          {
              _formBuilderService = formBuilderService;
          }
  
          public FormModel Resolve(Ticket source, ExcelClient destination, FormModel destMember, ResolutionContext context)
          {
              return _formBuilderService.GetFormBuilderWithAnswersExcel(source);
          }
      }
  </code></pre>
  
  <p>Do you know how can I make this work?</p>
  
  <p>Thank you,</p>
  
  <p>David</p>
  
  <hr>
  
  <p>Stacktrace</p>
  
  <blockquote>
    <p>An unhandled exception occurred while processing the request.
    MissingMethodException: No parameterless constructor defined for this
    object. System.RuntimeTypeHandle.CreateInstance(RuntimeType type, bool
    publicOnly,  bool wrapExceptions, ref bool canBeCached, ref
    RuntimeMethodHandleInternal ctor)</p>
    
    <p>AutoMapperMappingException: Error mapping types.</p>
    
    <p>Mapping types: Ticket -> ExcelClient Core.Models.Ticket ->
    Service.Models.TicketOrderView.ExcelClient</p>
    
    <p>Type Map configuration: Ticket -> ExcelClient Core.Models.Ticket ->
    Service.Models.TicketOrderView.ExcelClient</p>
    
    <p>Destination Member: FormModel lambda_method(Closure ,
    IQueryable , ICollection , ResolutionContext )</p>
    
    <p>AutoMapperMappingException: Error mapping types.</p>
    
    <p>Mapping types: IQueryable<code>1 -&gt; ICollection</code>1
    System.Linq.IQueryable<code>1[[Core.Models.Ticket, Core, Version=1.0.0.0,
    Culture=neutral, PublicKeyToken=null]] -&gt;
    System.Collections.Generic.ICollection</code>1[[Service.Models.TicketOrderView.ExcelClient,
    Service, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]</p>
  </blockquote>
  
  <p>And also:</p>
  
  <pre><code>    public class Ticket : Entity
          {
              public int Id { get; set; }
              ...
              public virtual FormBuilder FormBuilder { get; set; }
              public Ticket()
              {
  
              }
  
              public object Clone()
              {
                  return this.MemberwiseClone();
              }
          }
  
          public class ExcelClient
          {
              ...
  public virtual FormModel FormModel { get; set; }
              public ExcelClient()
              {
  
              }
          }
  </code></pre>