I need help installing EFCore 3.0 on .net framework 4.8

.net entity-framework entity-framework-core

Question

Whenever I want to update my EFCore reference to version 3 via NuGet on my NetFramework 4.8 project I get this error.

I confirm that I have netcore 3.0 SDK installed on my machine.

Visual studio error

Could not install package 'Microsoft.EntityFrameworkCore 3.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.8', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.              
1
2
9/30/2019 10:20:57 PM

Accepted Answer

This is a major breaking change in EF Core 3.0. But was fixed in EF Core 3.1.

Starting with 3.0, EF Core targets .NET Standard 2.1 and will run on all platforms that support this standard. This does not include .NET Framework.

Breaking changes included in EF Core 3.0

And here is the tracking issue with lots of background on this change: Target .NET Standard 2.1

And no future version of .NET Framework is planned to support .NET Standard 2.1. See eg:

Given many of the API additions in .NET Standard 2.1 require runtime changes in order to be meaningful, .NET Framework 4.8 will remain on .NET Standard 2.0 rather than implement .NET Standard 2.1. .NET Core 3.0 as well as upcoming versions of Xamarin, Mono, and Unity will be updated to implement .NET Standard 2.1.

Announcing .NET Standard 2.1.

So you must jump to EF Core 3.1 and at least .NET Framework. 4.7.2.

[UPDATE]

EF Core 3.1 reintroduces support for .NET Standard 2.0, rather than requiring .NET Standard 2.1 as was the case for EF Core 3.0. This means EF Core 3.1 will run on .NET Framework versions that support the standard.

And the .NET Framework 4.7.2 and higher fully support .NET Standard 2.0, and so EF Core 3.1 also. See here for the support matrix. https://devblogs.microsoft.com/dotnet/announcing-entity-framework-core-3-1-and-entity-framework-6-4/

2
4/9/2020 4:15:18 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow