title: AutoMapper dependency injection with parameters
body: <blockquote>
    <p>Error: No parameterless constructor for AutoMapperConfiguration</p>
  </blockquote>
  
  <p>I am using the nuget package <a href="https://www.nuget.org/packages/AutoMapper.Extensions.Microsoft.DependencyInjection/" rel="nofollow noreferrer">automapper DI</a></p>
  
  <pre><code>public class AutoMapperConfiguration : Profile
  {
      private readonly ICloudStorage _cloudStorage;
  
      public AutoMapperConfiguration(ICloudStorage cloudStorage)
      {
          _cloudStorage = cloudStorage;
  
          // Do mapping here
      }
  }
  
  public void ConfigureServices(IServiceCollection services)
  {
      services.AddSingleton&lt;ICloudStorage, AzureStorage&gt;();
      services.AddAutoMapper(); // Errors here
  }
  </code></pre>
  
  <p>How do I use the automapper DI with parameters?</p>