title: Unable to run migration in Visual Studio 2015
body: <p>I have visual studio 2015 and I'm working on an MVC project
  I want to connect ApplicaitonDbContext to MySql server
  I have entity framweork, mysql connector, mysql server, mysql for Visual Studio, my sql data entity and ef6 installed
  when i run the command enable-migrations i get an error:</p>
  <blockquote>
  <p>PM&gt; update-database</p>
  <p>Could not load file or assembly 'MySql.Data.Entity.EF6, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)</p>
  </blockquote>
  <p>This is my Web.config</p>
  <pre><code>&lt;configuration&gt;
  &lt;configSections&gt;
  &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
  &lt;section name=&quot;entityFramework&quot; type=&quot;System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot; requirePermission=&quot;false&quot; /&gt;
  &lt;/configSections&gt;
  &lt;connectionStrings&gt;
      &lt;add name=&quot;ApplicationDbContext&quot; connectionString=&quot;server=127.0.0.1;user id=schoolportal;password = admin@schoolportal.;database=schoolportaldb&quot; providerName=&quot;MySql.Data.MySqlClient&quot; /&gt;
  &lt;/connectionStrings&gt;
      &lt;appSettings&gt;
          &lt;add key=&quot;webpages:Version&quot; value=&quot;3.0.0.0&quot; /&gt;
          &lt;add key=&quot;webpages:Enabled&quot; value=&quot;false&quot; /&gt;
          &lt;add key=&quot;ClientValidationEnabled&quot; value=&quot;true&quot; /&gt;
          &lt;add key=&quot;UnobtrusiveJavaScriptEnabled&quot; value=&quot;true&quot; /&gt;
      &lt;/appSettings&gt;
  &lt;system.web&gt;
      &lt;authentication mode=&quot;None&quot; /&gt;
      &lt;compilation debug=&quot;true&quot; targetFramework=&quot;4.5&quot; /&gt;
      &lt;httpRuntime targetFramework=&quot;4.5&quot; /&gt;
      &lt;membership&gt;
      &lt;providers&gt;
          &lt;add name=&quot;MySQLMembershipProvider&quot; type=&quot;MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d&quot; connectionStringName=&quot;LocalMySqlServer&quot; enablePasswordRetrieval=&quot;false&quot; enablePasswordReset=&quot;true&quot; requiresQuestionAndAnswer=&quot;true&quot; applicationName=&quot;/&quot; requiresUniqueEmail=&quot;false&quot; passwordFormat=&quot;Clear&quot; maxInvalidPasswordAttempts=&quot;5&quot; minRequiredPasswordLength=&quot;7&quot; minRequiredNonalphanumericCharacters=&quot;1&quot; passwordAttemptWindow=&quot;10&quot; passwordStrengthRegularExpression=&quot;&quot; /&gt;
      &lt;/providers&gt;
      &lt;/membership&gt;
  &lt;profile&gt;
    &lt;providers&gt;
      &lt;add name=&quot;MySQLProfileProvider&quot; type=&quot;MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d&quot; connectionStringName=&quot;LocalMySqlServer&quot; applicationName=&quot;/&quot; /&gt;
    &lt;/providers&gt;
  &lt;/profile&gt;
  &lt;roleManager&gt;
      &lt;providers&gt;
          &lt;add name=&quot;MySQLRoleProvider&quot; type=&quot;MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d&quot; connectionStringName=&quot;LocalMySqlServer&quot; applicationName=&quot;/&quot; /&gt;
      &lt;/providers&gt;
  &lt;/roleManager&gt;
  &lt;/system.web&gt;
  &lt;system.webServer&gt;
      &lt;modules&gt;
        &lt;remove name=&quot;FormsAuthentication&quot; /&gt;
      &lt;/modules&gt;
  &lt;/system.webServer&gt;
  &lt;runtime&gt;
  &lt;assemblyBinding xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot;&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name=&quot;Microsoft.Owin.Security&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /&gt;
      &lt;bindingRedirect oldVersion=&quot;0.0.0.0-3.0.1.0&quot; newVersion=&quot;3.0.1.0&quot; /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name=&quot;Microsoft.Owin.Security.OAuth&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /&gt;
      &lt;bindingRedirect oldVersion=&quot;0.0.0.0-3.0.1.0&quot; newVersion=&quot;3.0.1.0&quot; /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name=&quot;Microsoft.Owin.Security.Cookies&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /&gt;
      &lt;bindingRedirect oldVersion=&quot;0.0.0.0-3.0.1.0&quot; newVersion=&quot;3.0.1.0&quot; /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name=&quot;Microsoft.Owin&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /&gt;
      &lt;bindingRedirect oldVersion=&quot;0.0.0.0-3.0.1.0&quot; newVersion=&quot;3.0.1.0&quot; /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name=&quot;Newtonsoft.Json&quot; culture=&quot;neutral&quot; publicKeyToken=&quot;30ad4fe6b2a6aeed&quot; /&gt;
      &lt;bindingRedirect oldVersion=&quot;0.0.0.0-6.0.0.0&quot; newVersion=&quot;6.0.0.0&quot; /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name=&quot;System.Web.Optimization&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /&gt;
      &lt;bindingRedirect oldVersion=&quot;1.0.0.0-1.1.0.0&quot; newVersion=&quot;1.1.0.0&quot; /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name=&quot;WebGrease&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /&gt;
      &lt;bindingRedirect oldVersion=&quot;0.0.0.0-1.5.2.14234&quot; newVersion=&quot;1.5.2.14234&quot; /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name=&quot;System.Web.Helpers&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /&gt;
      &lt;bindingRedirect oldVersion=&quot;1.0.0.0-3.0.0.0&quot; newVersion=&quot;3.0.0.0&quot; /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name=&quot;System.Web.Mvc&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /&gt;
      &lt;bindingRedirect oldVersion=&quot;1.0.0.0-5.2.3.0&quot; newVersion=&quot;5.2.3.0&quot; /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name=&quot;System.Web.WebPages&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; /&gt;
      &lt;bindingRedirect oldVersion=&quot;1.0.0.0-3.0.0.0&quot; newVersion=&quot;3.0.0.0&quot; /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name=&quot;MySql.Data&quot; publicKeyToken=&quot;c5687fc88969c44d&quot; culture=&quot;neutral&quot; /&gt;
      &lt;bindingRedirect oldVersion=&quot;0.0.0.0-6.8.3.0&quot; newVersion=&quot;6.8.3.0&quot; /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
  &lt;/runtime&gt;
  &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type=&quot;System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework&quot; /&gt;
      &lt;providers&gt;
        &lt;provider invariantName=&quot;System.Data.SqlClient&quot; type=&quot;System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer&quot; /&gt;
        &lt;provider invariantName=&quot;MySql.Data.MySqlClient&quot; type=&quot;MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d&quot;&gt;&lt;/provider&gt;
     &lt;/providers&gt;
  &lt;/entityFramework&gt;
  &lt;system.codedom&gt;
  &lt;compilers&gt;
    &lt;compiler language=&quot;c#;cs;csharp&quot; extension=&quot;.cs&quot; type=&quot;Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot; warningLevel=&quot;4&quot; compilerOptions=&quot;/langversion:6 /nowarn:1659;1699;1701&quot; /&gt;
    &lt;compiler language=&quot;vb;vbs;visualbasic;vbscript&quot; extension=&quot;.vb&quot; type=&quot;Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot; warningLevel=&quot;4&quot; compilerOptions=&quot;/langversion:14 /nowarn:41008 /define:_MYTYPE=\&amp;quot;Web\&amp;quot; /optionInfer+&quot; /&gt;
  &lt;/compilers&gt;
  &lt;/system.codedom&gt;
  &lt;system.data&gt;
    &lt;DbProviderFactories&gt;
        &lt;remove invariant=&quot;MySql.Data.MySqlClient&quot; name=&quot;MySQL Data Provider&quot; /&gt;
        &lt;add name=&quot;MySQL Data Provider&quot; invariant=&quot;MySql.Data.MySqlClient&quot; description=&quot;.Net Framework Data Provider for MySQL&quot; type=&quot;MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d&quot; /&gt;
     &lt;/DbProviderFactories&gt;
  &lt;/system.data&gt;
  &lt;/configuration&gt;
  </code></pre>