Search code examples
c#asp.net-mvcentity-frameworkdevart

Entity Data Model Wizard error (MVC)


I am getting an error when trying to add postgres at the prompt asking what version of entity framework I would like to use I get the following error:

Your project references the latest version of Entity Framework; however, an Entity Framework 3 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.

I have recreated the project and installed npgsql using the tutorial (https://github.com/npgsql/npgsql/wiki/Visual-Studio-Design-Time-Support---DDEX-Provider#install-entityframework-6-npgsql-and-npgsqlentityframework-from-nuget) and I am still getting that same error.

enter image description here

Any suggestions?


Solution

  • You should do something like that:

    Open Nuget:

    1.Pre-install entityframework

    2.Install Npgsql.entityframework

    1. Rebuild your project.

    Hope it helps;)