PostgreSQL with EntityFramework in MonoDevelop on Ubuntu

爱⌒轻易说出口 提交于 2019-12-11 18:26:36

问题


I tried to configure a project in MonoDevelop on Ubuntu, to use EntityFramework with Npgsql provider, by following official steps.

However, something seem to be wrong with that suggested configuration file (or I'm missing something), as I can't get rid of this error:

The Entity Framework provider type 'Npgsql.NpgsqlServices, Npgsql.EntityFrameworkLegacy, Version=2.1.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' registered in the application config file for the ADO.NET provider with invariant name 'Npgsql' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

Does anyone have a simple working example of the application connecting to PostgreSQL using Entity Framework in MonoDevelop?


回答1:


Please try with Npgsql 3.0.3 (the error says 2.1.0), the correct package for this would be EntityFramework6.Npgsql, not Npgsql.EntityFrameworkLegacy.



来源:https://stackoverflow.com/questions/32917924/postgresql-with-entityframework-in-monodevelop-on-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!