Partager via


EF 4.2 Release Candidate Available

 


The information in this post is out of date.

Visit msdn.com/data/ef for the latest information on current and past releases of EF.


 

We recently posted about our plans to rationalize how we name, distribute and talk about releases. We heard a resounding ‘Yes’ from you so then we posted about our plans for releasing EF 4.2. We then shipped EF 4.2 Beta 1.

Third party EF provider writers tried out EF 4.2 Beta 1 and identified a couple more areas that were causing issues for them. We have been working to improve these areas and today we are making EF 4.2 Release Candidate available. The final release of EF 4.2 will be available in the near future.

 

EF 4.2 = Bug Fixes + Semantic Versioning

When we released ‘EF 4.1 Update 1’ we introduced a bug that affects third party EF providers using a generic class for their provider factory implementation, things such as WrappingProviderFactory<TProvider>. We missed this during our testing and it was reported by some of our provider writers after we had shipped. If you hit this bug you will get a FileLoadException stating “The given assembly name or codebase was invalid”. This bug is blocking some third party providers from working with ‘EF 4.1 Update 1’ and the only workaround for folks using an affected provider is to ask them to remain on EF 4.1. Third party provider writers then identified some areas in EF where it was hard to get EF to work with their providers, so we decided to address these issues in the EF 4.2 release. These provider related changes will be the only changes between ‘EF 4.1 Update 1’ and ‘EF 4.2’.

Obviously a single bug fix wouldn’t normally warrant bumping the minor version, but we also wanted to take the opportunity to get onto the semantic versioning path rather than calling the release ‘EF 4.1 Update 2’.

 

Getting Started

The following walkthroughs are available for EF 4.2:

 

Getting EF 4.2 Release Candidate

EF 4.2 Release Candidate is available via NuGet as the EntityFramework.Preview package. If you already have the EntityFramework package installed then updating to the latest version will give you EF 4.2.

EntityFramework.Preview

 

Model First & Database First Templates

The templates for using the DbContext API with Model First and Database First are now available under the “Online Templates” tab when “Right-Click –> Add Code Generation Item…” is selected on the EF Designer.

AddDbContextTemplate

 

Support

This is a preview of features that will be available in future releases and is designed to allow you to provide feedback on the design of these features. It is not intended or licensed for use in production. If you need assistance we have an Entity Framework Pre-Release Forum.

 

What’s Not in This Release?

As covered earlier this release is just a small update to the DbContext & Code First runtime. The features that were included in EF June 2011 CTP require changes to the Core Entity Framework Libraries that are part of the .NET Framework and will ship at a later date. Note that Code First Migrations is not compatible with the EntityFramework.Preview package.  Please continue to use the most recent EntityFramework package when working with Migrations.  Our Code First Migrations work is continuing and we are working to get the next release in your hands soon.

 

ADO.NET Entity Framework Team

Entity Framework 4.2 RC - EULA.rtf

Comments

  • Anonymous
    October 10, 2011
    So, does this update include the code first migration you posted here before?

  • Anonymous
    October 11, 2011
    Extensions isn't working for VS 11 Dev. Preview for now. So any other way of getting the DbContect generator?

  • Anonymous
    October 11, 2011
    J.W. I'm amazed!! how can you post a comment to a blog article, if you even have not read it...

  • Anonymous
    October 11, 2011
    I'm a little confused. I am using the June CTP because I want the Enum and Spatial support. Your phrase, "The features that were included in EF June 2011 CTP require changes to the Core Entity Framework Libraries that are part of the .NET Framework and will ship at a later date." implies that they won't be in EF 4.2. Is that right? If so, do I have to keep on using the June CTP, and how long for?

  • Anonymous
    October 12, 2011
    @J.W.: No, Code First Migrations is a separate package in NuGet, and the plan is to keep it a separate download. Also, currently Code First Migrations is only compatible with EF 4.1. When we release the final version of EF 4.2 we plan to refresh Code First Migrations to make it compatible with EF 4.2.

  • Anonymous
    October 12, 2011
    @Tugberk: As you have learned, VSIX packages are filtered by version. We will have a DbContext template available for VS 11 but we don’t have one at the moment. There might be other workarounds but in the meanwhile my recommendation would be to add the template to a 4.0 project and then copy both TT files into your VS 11 project. You will also need to edit the TT files to updated the location of the EDMX file, which otherwise gets updated automatically.

  • Anonymous
    October 12, 2011
    @Rob Kent: The June 2011 CTP was our first attempt to release a full version of Entity Framework, including its core libraries, outside of the .NET Framework. Unfortunately, we encountered technical difficulties that severely affect the customer experience in doing so (hence the need to configure a different target framework in your applications when you are using the CTP). In the end we realized that our best option was to ship the next version of the core libraries of EF as part of .NET 4.5. Therefore new features that like enum and spatial type support require the updates to the core libraries will have to wait until .NET 4.5. Sorry if this is confusing. We will post a new article in this blog explaining the situation in more detail.

  • Anonymous
    October 12, 2011
    @Diego: Are you at liberty to say whether or not .NET 4.5 will be released prior to the release of Windows 8? It would be a shame to have to wait until possibly fall 2012 to start using EF spatial support.

  • Anonymous
    October 14, 2011
    @zl1: The features that were included in the June 2011 CTP will reappear in .NET 4.5, however I don't have any information that I can share about the schedule of .NET Framework 4.5 at the moment. I recommend following the.NET blog for that: blogs.msdn.com/.../dotnet. In any case, the EF team will keep trying ways to release new features more often. Unfortunately certain kinds of features require updates to the core libraries and those are currently only updatable as part of .NET.

  • Anonymous
    October 14, 2011
    The comment has been removed

  • Anonymous
    October 16, 2011
    @Ondrej: Updates to EF were not integrated on time for them to be included in the VS 11 Developer Preview that we released at the BUILD Conference. Your options are to use the June 2011 CTP of EF or wait until the next time a build of VS 11 is published. I am not sure about Blend. I will forward your question to othe people that might know the answer to that.

  • Anonymous
    October 18, 2011
    @Diego: Thanks a for that. Can't wait for the new VS then.

  • Anonymous
    October 27, 2011
    I used NuGet to install the package into a new solution but I get "System.Data.Entity 4.2.0.0 not found" when I try to add a new entity model. Now I get that error with every project, even without adding the package.

  • Anonymous
    October 30, 2011
    The comment has been removed

  • Anonymous
    November 03, 2011
    Is there no support for POCO in EF 4.2?

  • Anonymous
    November 09, 2011
    The comment has been removed

  • Anonymous
    January 12, 2012
    The comment has been removed

  • Anonymous
    January 12, 2012
    @Chris: Have you tried following steps from the readme (go to www.microsoft.com/.../details.aspx and download the June2011CTP-EF-Readme.html)? The readme contains steps bring the VS 2010 functionality back including uninstalling any publisher's policy installed by the CTP.