none
Unable to update EntityFramework models from PostgreSQL database (version 9.3) in Visual Studio 2017 RRS feed

  • Question

  •  Our developer group upgraded from Visual Studio 2013 to Visual Studio 2017. we now attempted to update some of our existing "db-first" EntityFramework models from our PostgreSQL database. When doing so, we received the following error.

    An exception of type 'System.ArgumentException' occurred while attempting to update from the database. The exception message is: 'Unable to convert runtime connection string to its design-time equivalent. The libraries required to enable Visual Studio to communicate with the database for design purposes (DDEX provider) are not installed for provider ‘Npgsql’.

    Does anyone has clue how to solve this problem? Thx!

    Thursday, April 11, 2019 7:33 PM

All replies

  • Hi Jane,

    Have you add the reference of "Npgsql.EntityFramework"? Here are some articles maybe you can refer to:

    http://www.npgsql.org/efcore/;

    Code-First Database Design with Entity Framework and PostgreSQL.

    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Regards,

    Kyle


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 12, 2019 5:45 AM
  • Hi Kyle,

    thanks for providing the above links!

    we use Entity Framework 6.

    so we should reference the link: http://www.npgsql.org/ef6/index.html

    we do reference Npgsql.EntityFramework.dll.

    it works fine in VS2013. However it does not work for VS2017.

    we see the following link: 

    https://stackoverflow.com/questions/53701136/how-to-setup-postgresql-with-visual-studio-2017-or-net-4-5

    we still not fully figure out yet.

    Tuesday, April 16, 2019 8:10 PM
  • EF 6 DB first is the last format in the way EF builds the persistence model using a EDMX. EF Core code first or DB first do not use an EDMX.

    Your alternative approach is to start use using EF 6 code first and build the model classes manually without the usage of migrations.

    Tuesday, April 16, 2019 9:28 PM
  • Hi Jane,

    I am afraid this is a issue about npgsql, which is a third-party dll. And this forum is discussing questions about Microsoft products and services. Maybe you can try submit this issue on GitHub: https://github.com/npgsql/npgsql/issues.

    Regards,

    Kyle


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 25, 2019 5:37 AM