postgresql does not appear in Data Source when generating .ADO.net Entity Data Model

后端 未结 5 1877
北荒
北荒 2020-12-31 21:14

I succeeded in accessing an existing postgresql dbase by using npgsql directly. I used for this:

  1. PostgreSQL 9.0.10 (32 bit)
  2. Visual Studio 2015 Commu
5条回答
  •  佛祖请我去吃肉
    2020-12-31 21:56

    This bugged me for hours in VS2017. I played with the app.config settings manually with no joy. The steps to fix it for me were:

    1. Install Npgsql.vsix from the version of npgsql i want to use from here
    2. Remove nuget packages EntityFramework, Npgsql, EntityFramework6.Npgsql
    3. Remove blocks in app.config with any references to these packages including entityFramework and assemblyBindings.
    4. Re-install the nuget packages above in that order
    5. Rebuild

    EDIT

    I also had to add the following to app.config to successfully run Enable-Migrations

    
      
          
          
      
    
    

提交回复
热议问题