This was the message I was getting while trying to run a unit test against my C# project:
No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient’
Not pleasant. My web project did have Entity Framework 6.x installed, so what was going on?
The issue wasn’t with my web project, it was with my test project. I needed to have those Entity Framework DLLs in my test project as well. I took the easy way out and installed them via NuGet Console. At the prompt, I entered this:
Voila, that was all I needed. But just make sure that when the NuGet Console is open, you change the “Default project” drop down list to point to your test project, not the project with the code to be tested.