title: "Parameter count mismatch" error during adding Entity Framework migration under .NET Core 2.0
body: <p>After migration of my project to .NET Core 2.0, fresh install of Visual Studio 15.5 and .NET CORE sdk 2.1.2, I am having an error when trying to add a migration using EF Core.</p>
  
  <pre><code>C:\Projects\SQLwallet\SQLwallet&gt;dotnet ef migrations add IdentityServer.
  An error occurred while calling method 'BuildWebHost' on class 'Program'.
  Continuing without the application service provider. Error: Parameter count mismatch.
  
  
  Done. To undo this action, use 'ef migrations remove'
  </code></pre>
  
  <p>As a result an empty migration class is created, with empty Up() and Down() methods.</p>
  
  <p>The program.cs looks like:</p>
  
  <pre><code>public class Program
  {
  
      public static IWebHost BuildWebHost(string[] args, string environmentName)
      {...}
  
      public static void Main(string[] args)
      {
  
  
          IWebHost host;
          host = BuildWebHost(args, "Development");
  </code></pre>
  
  <p>Please advise. The migration worked fine while on Core 1.0. I have a IDesignTimeDbContextFactory implemented, and my DBContext class has a parameterless constructor, so it could not be the reason.</p>