The latest versions (after version 5.0.0 ) of the Entity core framework are experiencing a failure to install in my project. Is this a general error?

Asked

Viewed 117 times

-2

When trying to install the latest version of Entity Framework Core in a project, using Visual Studio 2019, via Microsoft’s Install-Package command.Entityframeworkcore, I came across the following response via console.

Trying to collect package dependency information 'Microsoft.EntityFrameworkCore. 5.0.3' in relation to the project 'Controlegeralpharmacy', aiming at.Netframework, Version=v4.7.2' A Collecting dependency information took 0.2 ms Trying to solve dependencies of the 'Microsoft.EntityFrameworkCore. 5.0.3' package with Dependencybehavior 'Lowest' Resolve dependency information took 0 ms solving actions to install the package 'Microsoft.EntityFrameworkCore. 5.0.3' Actions resolved to install the package 'Microsoft.EntityFrameworkCore. 5.0.3' Recovering the package 'Entityframeworkcore 5.0.3' from 'Nuget'. Installation failed. Reversing... The package 'Microsoft.EntityFrameworkCore. 5.0.3' does not exists in the project 'Controlegeralpharmacy' The package 'Microsoft.EntityFrameworkCore. 5.0.3' does not exist in the folder 'C: Users asw source Repos Controlegeralpharmacy Packages' Run nuget actions led 541 ms Install-Package : Could not install the 'Microsoft.Entityframeworkcore 5.0.3' package. You are trying to install this package in a project that is intended to '. Netframework,Version=v4.7.2', but the package does not contain any Assembly reference or content file that is compatible with this structure. For more information, please contact package author. In line:1 character:1

  • Install-Package Microsoft.Entityframeworkcore
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    

However when I try to install by specifying any version equal to the one below 3.1.12, the package installs itself without further problems.

  • 1

    the message seems very clear: "You are trying to install this package in a project that is intended for '.Netframework,Version=v4.7.2'," and package name is "'Microsoft.EntityFrameworkCore. 5.0.3'" try to install a vesão compatible with the framework you are using

1 answer

0


As explicit in the message, this version of Microsoft.EntityFrameworkCore is not compatible with the framework used in your project. In this case you have 2 options: use another version; or change the framework used in your project.

Whenever using a package, I invite you to find out more about it, read the documentation, know when and where it can and should be used.

In this particular case, visiting the package page (https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/5.0.3) it is possible to see that this version is compatible only with NETStandard 2.1. detalhes do Microsoft.EntityFrameworkCore 5.0.3

When visiting the documentation of NETStandard (https://docs.microsoft.com/en-us/dotnet/standard/net-standard), can be verified that the . Net "Full" framework does not implement the NETStandard 2.1, is therefore not this package version compatible with your project.

What is the Netstandard?

The NETStandard is not a framework, but a "specification", and can be implemented by several frameworks. You always need to check which frameworks implement which versions of NETStandard.

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.