Skip to content

Explicitly downgrading packages when using shared framework #2265

@poke

Description

@poke

I am trying to use the Microsoft.AspNetCore.App shared framework, which includes EntityFrameworkCore 2.1, but I want to explicitly downgrade to EF Core 2.0 (I have reasons 😓).

So my project looks like this:

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.1</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.3" />
  </ItemGroup>
</Project>

However, when trying to build that, I get the following error message:

Detected package downgrade: Microsoft.EntityFrameworkCore from 2.1.0-rc1-final to 2.0.3. Reference the package directly from the project to select a different version.

Now, I don’t know if this is even a supported situation, downgrading packages that are contained in a shared framework. However, if that’s the case, then the error message is misleading: After all, I am referencing the package directly in the project.

Is downgrading individual packages from the shared framework supported? If it is not, can we do something about the error message there, so it would say that you cannot use the shared framework for this situation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions