The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramewor

能夠強迫部署EntityFramework.SqlServer.dll這個文件到輸出目錄app

 

找到1個老外的帖子,戳這裏(本人測試無效,你們有可能試一下。。)ide

解決方案如下:測試

在EF的上下文代碼CS文件(Model1.Context.cs)中添加這個方法orm

 

public void FixEfProviderServicesProblem() { //The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' //for the 'System.Data.SqlClient' ADO.NET provider could not be loaded. //Make sure the provider assembly is available to the running application. //See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. var instance = System.Data.Entity.SqlServer.SqlProviderServices.Instance; }
相關文章
相關標籤/搜索