I have project based on .NET 4.0 but I need to use EntityFramework 5 in my solution. So I install it from the NuGet.
After that I change target framework to .NET 4.5 (I'm using VS 2012) and rebuild project.
But in reference folder I see that project use EntityFramework.dll version 4.4.0.0.
Ho can I use newer version of EntityFramework?
in web.config
<compilation debug="true" targetFramework="4.5"> <assemblies> <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </assemblies> </compilation>
Versions 6.0, 6.1, 6.2, and 6.3 are no longer supported. Although Entity Framework 6. x is still supported, it is no longer being developed and will only receive fixes for security issues.
The file that needs to be edited is in the “C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes” directory.
The first version of Entity Framework was released in 2008, as part of . NET Framework 3.5 SP1 and Visual Studio 2008 SP1. Starting with the EF4. 1 release it has shipped as the EntityFramework NuGet Package - currently one of the most popular packages on NuGet.org.
Newer version (the real EF5) is dependent on .NET 4.5. If you have added EF5 when your project was based on .NET 4.0 you will have only EF 4.4 (EF5 version without features dependent on .NET 4.5). After upgrading to EF 5.0 you need to update EntityFramework package. You can try to use Update-Package
command. If it doesn't help you will need to uninstall package first and than add it again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With