Solution: No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient’

Friends,

In this post we will see the solution to a common problem when we use Entity Framework in our project. The error message is as below:

Schema specified is not valid. Errors:

"XYZ.ssdl(2,2) : error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient’". 

Make sure the provider is registered in the ‘EntityFramework’ section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information
.

This error occurs because the project code tries to use Entity Framework while no reference has been made to Entity Framework in the project. To resolve this error, we need to add reference to “Entity Framework” to the project. You can install EF using Nuget package manager. In order to check how this can be done, check this article.

Hope this little tip help you and save some of your precious time. Keep learning and sharing. :)

Next Recommended Reading Colored Entity in Entity Framework

Rebin Infotech
Think. Innovate. Grow.