2

I've upgraded my solution (WebApi) from EF 6.1.3 to 6.2 using Nuget.

My models and context are in a separate assembly than the main WebApi project. There is no entityframework section in the WebApi project web.config. However, there is one in the other assemblies' app.config referencing EF

Everything was working fine before the upgrade. Now, after upgrading, I'm getting:

An exception of type 'System.InvalidOperationException' occurred in EntityFramework.dll but was not handled in user code

Additional information: 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.

I've tried various answers from this SO question, but it still doesn't work (I get other exceptions when trying to use other suggested answers).

What am I missing here?

Community
  • 1
  • 1
Ivan-Mark Debono
  • 15,500
  • 29
  • 132
  • 263
  • Thanks for putting this question here. I was about to upgrade EF in my webapi projects. You saved my day(s). – Sarvesh Mishra Nov 06 '17 at 09:56
  • Try to also install EF to all of your projects, which have reference to assembly with your context and ensure, that corresponding EF section exists at their web.config. – Slava Utesinov Nov 07 '17 at 06:35

0 Answers0