title: Add-Migration not working with MySQL
body: <p>I have downloaded Asp.Net MVC 5.x Single page web application from <a href="https://aspnetboilerplate.com/Templates" rel="nofollow noreferrer">https://aspnetboilerplate.com/Templates</a>. I'm using MySQL and followed the steps mentioned in link <a href="https://aspnetboilerplate.com/Pages/Documents/EF-MySql-Integration" rel="nofollow noreferrer">https://aspnetboilerplate.com/Pages/Documents/EF-MySql-Integration</a>. But when I run the <code>Add-Migration</code> command it gives the error.</p>
  
  <p><strong>MyCompany.MyProject.Web\Web.Config:</strong></p>
  
  <pre><code>&lt;add name="Default" connectionString="Server=127.0.0.1;port=3306;Database=SparTestDb;uid=root;password=root" providerName="MySql.Data.MySqlClient"/&gt;
  </code></pre>
  
  <p><strong>MyCompany.MyProject.EntityFramework\Migrations\Configuration.cs</strong></p>
  
  <pre><code>public Configuration()
  {
      AutomaticMigrationsEnabled = false;
      ContextKey = "Spar";
  
      SetSqlGenerator("MySql.Data.MySqlClient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());
  }
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <p>PM> Add-Migration "AbpZero_Initial" System.NullReferenceException:
    Object reference not set to an instance of an object.    at
    MySql.Data.MySqlClient.MySqlProviderServices.GetDbProviderManifestToken(DbConnection
    connection)    at
    System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection
    connection)    at
    System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices
    providerServices, DbConnection connection)    at
    System.Data.Entity.Infrastructure.DefaultManifestTokenResolver.&lt;>c__DisplayClass1.b__0(Tuple<code>3
    k)    at
    System.Collections.Concurrent.ConcurrentDictionary</code>2.GetOrAdd(TKey
    key, Func<code>2 valueFactory)    at
    System.Data.Entity.Infrastructure.DefaultManifestTokenResolver.ResolveManifestToken(DbConnection
    connection)    at
    System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection
    connection, DbProviderManifest&amp; providerManifest)    at
    System.Data.Entity.DbModelBuilder.Build(DbConnection
    providerConnection)    at
    System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext
    internalContext)    at
    System.Data.Entity.Internal.RetryLazy</code>2.GetValue(TInput input)    at
    System.Data.Entity.Internal.LazyInternalContext.InitializeContext()<br>
    at System.Data.Entity.Internal.InternalContext.Initialize()    at
    System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes()
    at
    System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()
    at Abp.EntityFramework.AbpDbContext.RegisterToChanges()    at
    Abp.Zero.EntityFramework.AbpZeroDbContext<code>3..ctor(String
    nameOrConnectionString)    at
    MyCompany.MyProject.EntityFramework.SparDbContext..ctor() in
    C:\Users\MyName\Downloads\MyCompany.MyProject
    (1)\3.3.0\src\MyCompany.MyProject.EntityFramework\EntityFramework\SparDbContext.cs:line
    19
    --- End of stack trace from previous location where exception was thrown ---    at
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
    System.Data.Entity.Infrastructure.DbContextInfo.CreateInstance()    at
    System.Data.Entity.Infrastructure.DbContextInfo..ctor(Type
    contextType, DbProviderInfo modelProviderInfo, AppConfig config,
    DbConnectionInfo connectionInfo, Func</code>1 resolver)    at
    System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration
    configuration, DbContext usersContext, DatabaseExistenceState
    existenceState, Boolean calledByCreateDatabase)    at
    System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration
    configuration)    at
    System.Data.Entity.Migrations.Design.MigrationScaffolder..ctor(DbMigrationsConfiguration
    migrationsConfiguration)    at
    System.Data.Entity.Migrations.Design.ToolingFacade.ScaffoldRunner.RunCore()
    at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()
    Object reference not set to an instance of an object. PM></p>
  </blockquote>