Using Core 1 library in Core 2 web app RRS feed

  • Question

  • We have a library developed using Entity Framework 1, distributed as a local NuGet package. We have an application using that library, which is being upgraded to Entity Framework 2. When the web app downloads the NuGet packages, Entity Framework 2.0 version is used and everything compiles. However, we're getting runtime errors because the library uses a version of EF that's not compatible with 2.0.

    Is there a way around this or do we need to upgrade the library in order to upgrade the web app?

    Tuesday, January 2, 2018 5:41 PM

All replies

  • So what you are saying is that EF is not in a DAL so that the Web application wouldn't care what version of EF is being used? 

    Also that the application is not using DTO(s) that would be an abstraction away from the underlying ORM or underlying DB technology so that again, the Web application wouldn't care what the DB technology is about or ORM, because it is not in direct contact with the ORM or underlying DB technology.

    What kind of Web application is this ASP.NET MVC, Web form,  Web service or what?

    Tuesday, January 2, 2018 10:38 PM
  • Hi arb2015,

    >>Is there a way around this or do we need to upgrade the library in order to upgrade the web app?

    According to your description, it seems that you want to upgrade entity framework core 1.0 to entity framework core 2.0.

    If you want to upgrade your library application to EF Core 2.0 may require:

    1. Upgrading the target .NET platform of the application to one that supports .NET Standard 2.0. See Supported Platforms for more details.
    2. Identify a provider for the target database which is compatible with EF Core 2.0. See EF Core 2.0 requires a 2.0 database provider below.
    3. Upgrading all the EF Core packages (runtime and tooling) to 2.0. Refer to Installing EF Core for more details.
    4. Make any necessary code changes to compensate for breaking changes. See the Breaking Changes section below for more details.

    For more information, please refer to:


    Best regards,

    Zhanglong Wu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, January 3, 2018 1:19 AM