Publishing system with Entity Framework 6

0

There is an executable installer of Entity Framework 6 for servers.

I published the system on a Windows server 2008 server, and it is not working. You are returning the following error:

  

Schema specified is not valid. Errors:   Context.ControleHorasContext.ssdl (2,2): Error 0152: No Entity   Framework Provider for ADO.NET Provider with Invariant Name   'System.Data.SqlClient'. Make sure the provider is registered in the   'entityFramework' section of the application config file.

I have already checked the connection data in WebConfig, and everything is fine.

<add name="Entities"     connectionString="metadata=res://*/Context.ControleHorasContext.csdl|res://*/Con text.ControleHorasContext.ssdl|res://*/Context.ControleHorasContext.msl;provider =System.Data.SqlClient;provider connection string=&quot;data  source=VMCPT100;initial catalog=ControleHoras;persist security info=True;user  id=*;password=*;MultipleActiveResultSets=True;App=EntityFramewo rk&quot;" providerName="System.Data.EntityClient" /> 

I also checked the bin folder, and made sure that the EntityFramework.dll file is there.

    
asked by anonymous 29.07.2016 / 21:25

1 answer

-1

I have already resolved this issue by correcting the installation of the entity framework.

My solution has two projects: one for the MVC site, and one for data access.

The problem was occurring because I installed the framewokr entity through nuget only for the data access project, where it is actually used.

This works perfectly in the local environment.

But when you generated the package for publication, you complained that the entity framework was not installed correctly.

The solution was to install the entity framework in the solution (all projects).

    
10.01.2017 / 22:03