title: Entity framework code first + mysql System.NullReferenceException at first migration
body: <p>I'm trying to use MySQL database (ef code first approach, VS 2013 professional). I follow <a href="http://www.nzmk.com/Blogs/BlogsView/tabid/83/EntryId/8/MVC5-EF6-ContosoUniversity-code-first-approach-using-MySQL.aspx" rel="nofollow">these instructions</a>.</p>
  
  <p>My problem is that after I enable migrations I cannot do a first migration. I use command Add-migration migrationName and I got an error: </p>
  
  <blockquote>
    <p>"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 MySql.Data.Entity.MySqlManifestTokenResolver.ResolveManifestToken(DbConnection connection)
       ...</p>
    
    <p>Object reference not set to an instance of an object.".</p>
  </blockquote>
  
  <p>I tried to solved it f.e. in <a href="https://stackoverflow.com/questions/25404513/entity-framework-code-first-object-reference-not-set-to-an-instance-of-an-object">this</a> way. But now I found <a href="https://msdn.microsoft.com/en-us/data/jj618307.aspx" rel="nofollow">this</a>:</p>
  
  <blockquote>
    <p>"This can be caused by not specifying a required parameter for a scenario that you are using. For example specifying a connection string without specifying the provider name."</p>
  </blockquote>
  
  <p>So the problem is probably in my connenctions string. </p>
  
  <p>I have my connections string from VS > Server Explorer there is "active" connection to my database. I viewed the connection properties and copied a connection string into my web.config.</p>
  
  <p>In my project are references to MySql.Data, MySql.Data.Entity.EF6 and MySql.Web. </p>
  
  <p>Anyone have any ideas what should I do?</p>