I have a similar problem as the one presented in the question No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'
You need to register the Entity Framework provider for the System.Data.SqlClient SQL connection type. you should have in app.config:
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
The problem in my case was that inorder to catch another exception I had enabled CLR exceptions. And I forgot to disable it.
I disabled it in my exception setting. and it overlooked this exception and went on to run and create a db for me (in my case) automatically.
There are 2 options which you can try.
1) Load "System.Data.SqlClient" manually
Include the follow statement in your context class
var type = typeof(System.Data.Entity.SqlServer.SqlProviderServices);
2) Don't load "System.Data.SqlClient"
By change from
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
to
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
I hope your issue is resolved.