Migrations Entityframework C#

Asked

Viewed 36 times

0

Error while performing Migrations.

The ADO.NET Provider with invariant name 'Sqlclient' is either not Registered in the machine or application config file, or could not be Loaded. See the Inner Exception for Details.

My App.Config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<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>
<startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
    <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
</entityFramework>

<connectionStrings>
    <add name="MinhaStringDeConexao"
        connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=Adventure;Integrated Security=True"
        providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
  • I would kick error in connectionString. Insert a point and comma in security=True;

1 answer

0

Your EntityFramework not installed correctly, execute the following command on Package Manage Console.:

Install-Package EntityFramework

Browser other questions tagged

You are not signed in. Login or sign up in order to post.