Detected package version outside of dependency constraint :Microsoft.AspNetCore.App 2.1.1
EF Core and ASP.NET Core (were) used to ship together. In ASP.NET Core 2.x (Microsoft.AspNetCore.App
/Microsoft.AspNetCore.App
meta packages), EF Core is part of ASP.NET Core meta packages (see Microsoft.AspNetCore.App metapackage for ASP.NET Core 2.1).
With ASP.NET Core 3.0, EntityFrameworkCore, JSON.NET and Microsoft.CodeAnalysis won't be party of Microsoft.AspNetCore.App/All
packages anymore. See the GitHub announcement.
You are getting this issue, because Install-Package Microsoft.EntityFrameworkCore.SqlServer
is installing the latest version of EF Core (2.2) while your ASP.NET Core application is still at 2.1.
Or upgrade your application to ASP.NET Core 2.2.
But the issue here seems that ChinookCoreAPI
requires the older version of ASP.NET Core (and EF Core), namely 2.1. From your question its not clear if you did the Install-Package Microsoft.EntityFrameworkCore.SqlServer
on your application project or on ChinookCoreAPI
. If its on Install-Package Microsoft.EntityFrameworkCore.SqlServer
installing the newest EF Core on the App project should fix it. Otherwise lower the verison of ChinookCoreAPI
to 2.1.1
Your Current Version of ASPNET Core (Microsoft.AspNetCore.App 2.1.1) does not support latest Version of EFCore (Microsoft.EntityFrameworkCore 2.2.0).
In Startup.cs, Decrease the EF Version, as "Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.1" And Restore again.
This worked for me.