Skip to content

EDM wizard trouble shooting (Npgsql)

kenjiuno edited this page Mar 30, 2015 · 4 revisions

Check the trouble shooting cases, if you have problems on using Entity Data Model wizard in Vs2012/Vs2013:


Case 1: The wizard disappears, when we click [Next] at Choose Your Data Connection.

Point:

  • You need to use same version of Npgsql: GAC's Npgsql and project's Npgsql.

How to fix?

  • If you use 2.2.3.0 installer, use 2.2.3.0 Npgsql and Npgsql.EntityFramework in your project.
  • If you use 2.2.4.3 installer, use 2.2.4.3 Npgsql and Npgsql.EntityFramework in your project.

Note:


Case 2: The dialog says "A compatible provider not found".

nocompat

Message:

  • Your project references the latest version of Entity Framework; however, an Entity Framework database provider compatible with this version could not be found for your data connection.
  • If you have already installed a compatible provider, ensure you have rebuilt your project before performing this action.
  • Otherwise, exit this wizard, install a compatible provider, and rebuild your project before performing this action.
  • Learn more about this

Point:

  • Make sure your project has Npgsql assembly reference.
  • Make sure your project has Npgsql.EntityFramework assembly reference.
  • Check <provider> section at your project's App.config or Web.config.
  • Check if you have built your project once.

How to fix? 1

  • Make sure you have included <provider> of Npgsql.
  • For example: <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql.EntityFramework" />

Sample App.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  <entityFramework>
    <providers>
      <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql.EntityFramework" />
    </providers>
  </entityFramework>
</configuration>

How to fix? 2

  • Remove version indication from type attribute.
  • For example: <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql.EntityFramework" />

How to fix? 3

  • Specify a full type specification.
  • For example: <provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql.EntityFramework, Version=2.2.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />

Case 3: Only Entity Framework 5.0 selection

onlyefv5

Message:

  • An Entity Framework database provider compatible with the latest version of Entity Framework could not be found for your data connecton.
  • If you have already installed a compatible provider, ensure you have rebuilt your project before performing this action.
  • Otherwise, exit this wizard, install a compatible provider, and rebuild your project before performing this action.
  • Learn more about this

Point:

  • Make sure you have installed EntityFramework (ver 6) assembly in your project.
  • Use NuGet package manager for installation.

References: