Search code examples
entity-frameworkvisual-studio-2012entity-framework-4connection-stringupdatemodel

Update model from database shows only newer .NET frameworks


I have a winforms application that is using .NET 4. I created another database that has the exact same structure as the old one, and now I have to change the connection string in my Data Model to point to the new database.

If I change the connection string in the App.config file and then in the designer press Update Model From Database it doesn't show any connections(that's fine), but when I try to add a new connection it only lets me choose Entity Framework version 5.0, as shown in the picture bellow:

enter image description here

The problem is that I need version 4. I searched a lot on the Internet for someone with a similar problem, but I couldn't find anything.. What do I do wrong?


Solution

  • I was able to change the entity framework version by typing this command in the NuGet Package Manager Console:

    Install-Package EntityFramework -version 4.3.0

    After that, in the update wizard I was able to select Entity Framework 4.3.0.0 and it worked like a charm.

    This is the link that helped me: http://msdn.microsoft.com/en-US/data/dn440683