The type initializer for 'System.Data.Entity.Migrations.DbMigrationsConfiguration`1' threw an exception

asp.net asp.net-mvc c# entity-framework mysql

Question

I haveASP.Net MVC site.

Computer Stack

  • 4.6 of ASP.Net
  • C#.Net
  • EF 6
  • Database using MySQL

I'm attempting to create a database utilisingNuget command:-

Enable-Migrations -force

I am experiencing the following exception

The type initializer for 'System.Data.Entity.Migrations.DbMigrationsConfiguration`1' threw an exception.

I've already done the following things:

My App.Config

 <connectionStrings>
<add name="mydbContext" providerName="MySql.Data.MySqlClient" connectionString="Server=localhost;port=8080;database=mydb;uid=root;password=" />
</connectionStrings>



<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory,   MySql.Data.Entity.EF6" />
<providers>
  <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.8.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
</providers>

1
5
5/23/2017 12:03:09 PM

Popular Answer

ZZZ_tmp
4
9/28/2019 11:38:37 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow