I used Nuget to update to Entity Framework 5.0.0-beta2 in my MVC3 -> MVC4 project.
I'm trying to get the enums to work, and each migration I add just ignores the enum fields.
I found this in the web.config:
<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=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
How do I get this reference updated to EF5?
Is that what I need to get enums working?
I found the answer to this on Julie Lerman's blog.
The solution is to remove the EF5 Nuget package, update the app to target .net 4.5 and then add the Nuget for EF5 Beta back in. Apparently when you are targeting .net 4.0 the Nuget package will add EF4.4 instead of 5.
Check the Project Target which must target .NET 4.5 not .NET 4.0. Even if you are in VS 11, EF 5 needs .NET 4.5.
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