Error: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'

后端 未结 13 2343
[愿得一人]
[愿得一人] 2020-12-08 04:18

I recently upgraded/updated Entity Framework in an old project from version 4 or 5 to version 6. Now I get this exception:

An exception of type \'Syst

13条回答
  •  自闭症患者
    2020-12-08 05:05

    Ok, this is pretty weird. I have a couple of projects: one is a UI project (an ASP.NET MVC project) and the others are projects for stuff like repositories. The repositories project had a reference to EF, but the UI project didn't (because it didn't need one, it just needed to reference the other projects). After I installed EF for the UI project as well, everything started working. This is why, it added this piece of code to my Web.config:

    
      
      
        
      
    
    

提交回复
热议问题